<cfsetting requesttimeout="120">
<cfparam name="Workshop_ID" type="numeric" default="0" />
<cfparam name="Organizer_ID" type="numeric" default="0" />
<cfparam name="Manager_ID" type="numeric" default="0" />
<cfparam name="Site_ID" type="numeric" default="0" />
<cfparam name="Organization_ID" type="numeric" default="0" />
<cfparam name="Zip_Code_ID" type="string" default="0" />
<cfparam name="City_ID" type="string" default="0" />
<cfparam name="County_ID" type="numeric" default="0" />
<cfparam name="Region_ID" type="numeric" default="0" />
<cfparam name="District_ID" type="numeric" default="0" />
<cfparam name="School_ID" type="numeric" default="0" />
<cfparam name="rollupLevel" type="string" default="workshop" />
<cfscript>

	workshopGateway = new assets.calgrants.com.gateway.WorkshopGateway();
	siteGateway = new assets.calgrants.com.gateway.SiteGateway();
	organizationGateway = new assets.calgrants.com.gateway.OrganizationGateway();
	countyGateway = new assets.calgrants.com.gateway.CountyGateway();
	evaluationGateway = new assets.calgrants.com.gateway.EvaluationGateway();
	storedProcedureGateway = new assets.calgrants.com.gateway.StoredProcedureGateway();
	
	if (Workshop_ID gt 0) {
		qWorkshop = workshopGateway.query(Workshop_ID = Workshop_ID);
		qSite = siteGateway.query(Site_ID = qWorkshop.Site_ID);
		qOrganization = organizationGateway.query(Organization_ID = qSite.Organization_ID);
		qCounty = countyGateway.query(County_ID = qSite.County_ID);
		base = evaluationGateway.report(workshopIDs = Workshop_ID);
		baseData = StructNew();
		genderData = StructNew();
		gds = storedProcedureGateway.readGDS(workshopIDs = Workshop_ID);
		gdsData = StructNew();
		trendWorkshops = workshopGateway.query(Site_ID = qWorkshop.Site_ID, Deleted = 0, Approved = 1);
		trendData = StructNew();
		site = qSite.Site;
		organization = qOrganization.Organization;
		city = qSite.City;
		county = qCounty.County;
		region = qCounty.Region;
		siteType = qSite.Site_Type;
		siteSince = qSite.Initial_Program_Year;
		computerBasedWorkshop = qWorkshop.Online;
		organizationSince = qOrganization.Initial_Program_Year;
		//qualifiedScholarship = true;
		followUpRequests = qWorkshop.Follow_Up_Request_Count;
		followUpRequestsPct = qWorkshop.Follow_Up_Request_Count / qWorkshop.Student_Count * 100;
		followedUp = qWorkshop.Complete_Follow_Up_Request_Count;
	} else if (Organizer_ID gt 0) {
		// not implemented
	} else if (Manager_ID gt 0) {
		// not implemented
	} else if (Site_ID gt 0) {
		qSite = siteGateway.query(Site_ID = Site_ID);
		qOrganization = organizationGateway.query(Organization_ID = qSite.Organization_ID);
		qCounty = countyGateway.query(County_ID = qSite.County_ID);
		base = evaluationGateway.report(siteIDs = Site_ID);
		baseData = StructNew();
		genderData = StructNew();
		gds = storedProcedureGateway.readGDS(siteIDs = Site_ID);
		gdsData = StructNew();
		trendWorkshops = workshopGateway.query(Site_ID = Site_ID, Deleted = 0, Approved = 1);
		trendData = StructNew();
		site = qSite.Site;
		organization = qOrganization.Organization;
		city = qSite.City;
		county = qCounty.County;
		region = qCounty.Region;
		siteType = qSite.Site_Type;
		siteSince = qSite.Initial_Program_Year;
		//computerBasedWorkshop = qWorkshop.Online;
		organizationSince = qOrganization.Initial_Program_Year;
		//qualifiedScholarship = true;
		//followUpRequests = qWorkshop.Follow_Up_Request_Count;
		//followUpRequestsPct = qWorkshop.Follow_Up_Request_Count / qWorkshop.Student_Count * 100;
		//followedUp = qWorkshop.Complete_Follow_Up_Request_Count;
	} else if (Organization_ID gt 0) {
		qOrganization = organizationGateway.query(Organization_ID = Organization_ID);
		qCounty = countyGateway.query(County_ID = qOrganization.County_ID);
		base = evaluationGateway.report(organizationIDs = Organization_ID);
		baseData = StructNew();
		genderData = StructNew();
		gds = storedProcedureGateway.readGDS(organizationIDs = Organization_ID);
		gdsData = StructNew();
		trendWorkshops = workshopGateway.query(organizationIDs = Organization_ID, Deleted = 0, Approved = 1);
		trendData = StructNew();
		//site = qSite.Site;
		organization = qOrganization.Organization;
		//city = qSite.City;
		county = qCounty.County;
		region = qCounty.Region;
		//siteType = qSite.Site_Type;
		//siteSince = qSite.Initial_Program_Year;
		//computerBasedWorkshop = qWorkshop.Online;
		organizationSince = qOrganization.Initial_Program_Year;
		//qualifiedScholarship = true;
		//followUpRequests = qWorkshop.Follow_Up_Request_Count;
		//followUpRequestsPct = qWorkshop.Follow_Up_Request_Count / qWorkshop.Student_Count * 100;
		//followedUp = qWorkshop.Complete_Follow_Up_Request_Count;
	} else if (Zip_Code_ID gt 0) {
		
	} else if (City_ID gt 0) {
		
	} else if (County_ID gt 0) {
		//qOrganization = organizationGateway.query(Organization_ID = Organization_ID);
		qCounty = countyGateway.query(County_ID);
		base = evaluationGateway.report(countyIDs = County_ID);
		baseData = StructNew();
		genderData = StructNew();
		gds = storedProcedureGateway.readGDS(countyIDs = County_ID);
		gdsData = StructNew();
		trendWorkshops = workshopGateway.query(countyIDs = County_ID, Deleted = 0, Approved = 1);
		trendData = StructNew();
		//site = qSite.Site;
		//organization = qOrganization.Organization;
		//city = qSite.City;
		county = qCounty.County;
		region = qCounty.Region;
		//siteType = qSite.Site_Type;
		//siteSince = qSite.Initial_Program_Year;
		//computerBasedWorkshop = qWorkshop.Online;
		//organizationSince = qOrganization.Initial_Program_Year;
		//qualifiedScholarship = true;
		//followUpRequests = qWorkshop.Follow_Up_Request_Count;
		//followUpRequestsPct = qWorkshop.Follow_Up_Request_Count / qWorkshop.Student_Count * 100;
		//followedUp = qWorkshop.Complete_Follow_Up_Request_Count;		
	} else if (Region_ID gt 0) {
		//qOrganization = organizationGateway.query(Organization_ID = Organization_ID);
		qCounty = countyGateway.query(Region_ID = Region_ID);
		base = evaluationGateway.report(regionIDs = Region_ID);
		baseData = StructNew();
		genderData = StructNew();
		gds = storedProcedureGateway.readGDS(programYear = "2010-2011,2011-2012,2012-2013", regionIDs = Region_ID);
		gdsData = StructNew();
		trendWorkshops = workshopGateway.query(regionIDs = Region_ID, Deleted = 0, Approved = 1);
		trendData = StructNew();
		//site = qSite.Site;
		//organization = qOrganization.Organization;
		//city = qSite.City;
		//county = qCounty.County;
		region = qCounty.Region;
		//siteType = qSite.Site_Type;
		//siteSince = qSite.Initial_Program_Year;
		//computerBasedWorkshop = qWorkshop.Online;
		//organizationSince = qOrganization.Initial_Program_Year;
		//qualifiedScholarship = true;
		//followUpRequests = qWorkshop.Follow_Up_Request_Count;
		//followUpRequestsPct = qWorkshop.Follow_Up_Request_Count / qWorkshop.Student_Count * 100;
		//followedUp = qWorkshop.Complete_Follow_Up_Request_Count;
	} else if (District_ID gt 0) {
		
	} else if (School_ID gt 0) {
		
	} else {
		//qOrganization = organizationGateway.query(Organization_ID = Organization_ID);
		//qCounty = countyGateway.query(Region_ID = Region_ID);
		base = evaluationGateway.report();
		baseData = StructNew();
		genderData = StructNew();
		gds = storedProcedureGateway.readGDS();
		gdsData = StructNew();
		trendWorkshops = workshopGateway.query(Deleted = 0, Approved = 1);
		trendData = StructNew();
		//site = qSite.Site;
		//organization = qOrganization.Organization;
		//city = qSite.City;
		//county = qCounty.County;
		//region = qCounty.Region;
		//siteType = qSite.Site_Type;
		//siteSince = qSite.Initial_Program_Year;
		//computerBasedWorkshop = qWorkshop.Online;
		//organizationSince = qOrganization.Initial_Program_Year;
		//qualifiedScholarship = true;
		//followUpRequests = qWorkshop.Follow_Up_Request_Count;
		//followUpRequestsPct = qWorkshop.Follow_Up_Request_Count / qWorkshop.Student_Count * 100;
		//followedUp = qWorkshop.Complete_Follow_Up_Request_Count;
	}
	colors = "##2682d6,##5dba5d,##0f2a88,##55b4d0,##417630,##aad9e7,##444444,##2682d6,##5dba5d,##0f2a88,##55b4d0,##417630,##aad9e7,##444444,##2682d6,##5dba5d,##0f2a88,##55b4d0,##417630,##aad9e7,##444444";
	questions = "1,6,7,10,11,12";
	baseResponses = base[1].response_count;
</cfscript>

<!--- <cfif Workshop_ID gt 0>
	<cfset base = evaluationGateway.report(workshopIDs = Workshop_ID) />
	<cfset baseData = StructNew() />
	<cfset genderData = StructNew() />
	<cfset gds = storedProcedureGateway.readGDS(workshopIDs = Workshop_ID) />
	<cfset gdsData = StructNew() />
	<cfset trendWorkshops = workshopGateway.query(Site_ID = qWorkshop.Site_ID, Deleted = 0, Approved = 1) />
	<cfset trendData = StructNew() />
</cfif> --->

<!--- build base data --->
<cfloop index="q" list="#questions#">
	<cfif NOT StructKeyExists(baseData, q)>
		<cfset baseData[q] = StructNew()>
		<cfset baseData[q]["question"] = base[q].Question />
		<cfset baseData[q]["responseCount"] = base[q].Response_Count />
		<cfset baseData[q]["noResponseCount"] = base[q].No_Response_Count />
		<cfset baseData[q]["multiResponseCount"] = base[q].Multi_Response_Count />
		<cfset baseData[q]["required"] = base[q].Question_Required />
		<cfset baseData[q]["type"] = base[q].Question_Type />
		<cfset baseData[q]["answers"] = StructNew() />
	</cfif>
	<cfloop index="a" from="1" to="#ArrayLen(base[q].Answers)#">
		<cfif base[q].Answers[a].Answer_Active eq 1>
			<cfset n = base[q].Answers[a].Answer_Number />
			<cfset baseData[q]["answers"][n] = StructNew() />
			<!--- <cfset baseData[q]["answers"][n]["programYear"] = qWorkshop.Program_Year /> --->
			<cfset baseData[q]["answers"][n]["answer"] = base[q].Answers[a].Answer />
			<cfset baseData[q]["answers"][n]["count"] = base[q].Answers[a].Response_Count />
			<cfset baseData[q]["answers"][n]["percent"] = base[q].Answers[a].Response_Percent />
		</cfif>
	</cfloop>
</cfloop>

<!--- build trend data --->
<cfquery name="getProgramYears" dbtype="query">
	select distinct Program_Year from trendWorkshops where Program_Year != '2008-2009' order by Program_Year
</cfquery>
<cfset programYears = ValueList(getProgramYears.Program_Year) />
<cfif ListLen(programYears) gt 1>
	<cfloop index="py" list="#programYears#">
		<cfif Workshop_ID gt 0 or Site_ID gt 0>
			<cfset trend = evaluationGateway.report(siteIDs = qSite.Site_ID, programYear = py) />
		<cfelseif Organization_ID gt 0>
			<cfset trend = evaluationGateway.report(organizationIDs = Organization_ID, programYear = py) />
		<cfelseif County_ID gt 0>
			<cfset trend = evaluationGateway.report(countyIDs = County_ID, programYear = py) />
		<cfelseif Region_ID gt 0>
			<cfset trend = evaluationGateway.report(regionIDs = Region_ID, programYear = py) />
		<cfelse>
			<cfset trend = evaluationGateway.report(programYear = py) />
		</cfif>
		<cfquery name="getProgramYearWorkshopCount" dbtype="query">
			select count(*) as workshopCount from trendWorkshops where Program_Year = '#py#'
		</cfquery>
		<cfset workshopCount = getProgramYearWorkshopCount.workshopCount />
		<cfloop index="q" list="#questions#">
			<cfif NOT StructKeyExists(trendData, q)>
				<cfset trendData[q] = StructNew()>
				<cfset trendData[q]["question"] = trend[q].Question />
				<cfset trendData[q]["responseCount"] = trend[q].Response_Count />
				<cfset trendData[q]["noResponseCount"] = trend[q].No_Response_Count />
				<cfset trendData[q]["multiResponseCount"] = trend[q].Multi_Response_Count />
				<cfset trendData[q]["required"] = trend[q].Question_Required />
				<cfset trendData[q]["type"] = trend[q].Question_Type />
				<cfset trendData[q]["answers"] = StructNew() />
			</cfif>
			<cfloop index="a" from="1" to="#ArrayLen(trend[q].Answers)#">
				<cfif trend[q].Answers[a].Answer_Active eq 1>
					<cfset n = trend[q].Answers[a].Answer_Number />
					<cfif NOT StructKeyExists(trendData[q]["answers"], n)>
						<cfset trendData[q]["answers"][n] = ArrayNew(1) />
					</cfif>
					<cfset dataSet = StructNew() />
					<cfset dataSet["programYear"] = py />
					<cfset dataSet["workshopCount"] = workshopCount />
					<cfset dataSet["answer"] = trend[q].Answers[a].Answer />
					<cfset dataSet["count"] = trend[q].Answers[a].Response_Count />
					<cfset dataSet["percent"] = trend[q].Answers[a].Response_Percent />
					<cfset ArrayAppend(trendData[q]["answers"][n], dataSet) />
				</cfif>
			</cfloop>
		</cfloop>
	</cfloop>
</cfif>

<!--- build gender data --->
<cfset genderAnswers = baseData[11].answers />
<cfset genderData["totalCount"] = 0 />
<cfloop item="k" collection="#genderAnswers#">
	<cfif genderAnswers[k].answer neq "Decline to answer">
		<cfset genderData[LCase(genderAnswers[k].answer) & "Count"] = genderAnswers[k].count>
		<cfset genderData[LCase(genderAnswers[k].answer) & "Percent"] = genderAnswers[k].percent>
	<cfelse>
		<cfset genderData["declineToAnswerCount"] = genderAnswers[k].count>
		<cfset genderData["declineToAnswerPercent"] = genderAnswers[k].percent>
	</cfif>
	<cfset genderData["totalCount"] = genderData["totalCount"] + genderAnswers[k].count />
</cfloop>
<cfset genderData["femaleOnCount"] = Int(genderData.femalePercent/10) />
<cfset genderData["femaleOffCount"] = 10 - genderData["femaleOnCount"] />
<cfset genderData["femaleCountLeadingCols"] = genderData["femaleOnCount"] - 1 />
<cfset genderData["femaleCountTrailingCols"] = 9 - genderData["femaleCountLeadingCols"] />
<cfset genderData["maleOnCount"] = Int(genderData.malePercent/10) />
<cfset genderData["maleOffCount"] = 10 - genderData["maleOnCount"] />
<cfset genderData["maleCountLeadingCols"] = genderData["maleOnCount"] - 1 />
<cfset genderData["maleCountTrailingCols"] = 9 - genderData["maleCountLeadingCols"] />

<!--- build GDS Data --->
<cfset gdsData["totalCount"] = 0 />
<cfset gdsData["fafsaSubmitted"] = 0 />
<cfset gdsData["fafsaCompleted"] = 0 />
<cfset gdsData["fafsaCompletedPercent"] = 0 />
<cfset gdsData["fafsaPellEligible"] = 0 />
<cfset gdsData["fafsaDollarsAwarded"] = 0 />
<cfset gdsData["calgrantSubmitted"] = 0 />
<cfset gdsData["calgrantCompleted"] = 0 />
<cfset gdsData["calgrantCompletedPercent"] = 0 />
<cfset gdsData["calgrantAwarded"] = 0 />
<cfset gdsData["calgrantAwardedPercent"] = 0 />
<cfset gdsData["calgrantDollarsAwarded"] = 0 />
<cfloop query="gds">
	<cfset gdsData["totalCount"] = gdsData["totalCount"] + 1 />
	<!--- submitted = SSN value --->
	<cfif Len(SSN) gt 0>
		<cfset gdsData["fafsaSubmitted"] = gdsData["fafsaSubmitted"] + 1 />
		<!--- fafsa/dream act completed --->
		<cfif Len(Trim(Primary_EFC)) gt 0>
			<cfset gdsData["fafsaCompleted"] = gdsData["fafsaCompleted"] + 1 />
				<cfif Pell_Eligible eq "y">
					<cfset gdsData["fafsaPellEligible"] = gdsData["fafsaPellEligible"] + 1 />
					<cfset gdsData["fafsaDollarsAwarded"] = gdsData["fafsaDollarsAwarded"] + 3685 />
				</cfif>
		</cfif>
		<!--- calgrant submitted --->
		<cfif Len(GPA) gt 0>
			<cfset gdsData["calgrantSubmitted"] = gdsData["calgrantSubmitted"] + 1 />
			<!--- calgrant completed --->
			<cfif Len(Trim(Primary_EFC)) gt 0 and (On_Time_ISIR eq "y" or On_Time_Dream_Act eq "y")>
				<cfset gdsData["calgrantCompleted"] = gdsData["calgrantCompleted"] + 1 />
				<cfif Award_Status_Code_1 eq "50" or Award_Status_Code_1 eq "25" or Award_Status_Code_2 eq "50" or Award_Status_Code_2 eq "25" or Award_Status_Code_3 eq "50" or Award_Status_Code_3 eq "25">
					<cfset gdsData["calgrantAwarded"] = gdsData["calgrantAwarded"] + 1 />
					<cfset gdsData["calgrantDollarsAwarded"] = gdsData["calgrantDollarsAwarded"] + 1 />
					<cfif Award_Status_Code_1 eq "50">
						<cfset gdsData["calgrantDollarsAwarded"] = gdsData["calgrantDollarsAwarded"] + Graw_Amount_1 />
					<cfelseif Award_Status_Code_2 eq "50">
						<cfset gdsData["calgrantDollarsAwarded"] = gdsData["calgrantDollarsAwarded"] + Graw_Amount_2 />
					<cfelseif Award_Status_Code_3 eq "50">
						<cfset gdsData["calgrantDollarsAwarded"] = gdsData["calgrantDollarsAwarded"] + Graw_Amount_3 />
					<cfelseif Award_Status_Code_1 eq "25">
						<cfset gdsData["calgrantDollarsAwarded"] = gdsData["calgrantDollarsAwarded"] + Graw_Amount_1 />
					<cfelseif Award_Status_Code_2 eq "25">
						<cfset gdsData["calgrantDollarsAwarded"] = gdsData["calgrantDollarsAwarded"] + Graw_Amount_2 />
					<cfelseif Award_Status_Code_3 eq "25">
						<cfset gdsData["calgrantDollarsAwarded"] = gdsData["calgrantDollarsAwarded"] + Graw_Amount_3 />
					</cfif>
				</cfif>
			</cfif>
		</cfif>
	</cfif>
</cfloop>
<cfif gdsData["fafsaSubmitted"] gt 0>
	<cfset gdsData["fafsaCompletedPercent"] = Int(gdsData["fafsaCompleted"]/gdsData["fafsaSubmitted"]*100) />
	<cfset gdsData["fafsaCompletedGingerbreadCount"] = Int(gdsData["fafsaCompleted"]/gdsData["fafsaSubmitted"]*10) />
<cfelse>
	<cfset gdsData["fafsaCompletedPercent"] = 0 />
	<cfset gdsData["fafsaCompletedGingerbreadCount"] = 0 />
</cfif>
<cfset gdsData["fafsaSubmittedGingerbreadCount"] = 10 - gdsData["fafsaCompletedGingerbreadCount"] />
<cfset gdsData["fafsaCountLeadingCols"] = (Int(gdsData["fafsaCompletedPercent"]/10)) - 1 />
<cfset gdsData["fafsaCountTrailingCols"] = 9 - gdsData["fafsaCountLeadingCols"] />
<cfif gdsData["calgrantSubmitted"] gt 0>
	<cfset gdsData["calgrantCompletedPercent"] = Int(gdsData["calgrantCompleted"]/gdsData["calgrantSubmitted"]*100) />
	<cfset gdsData["calgrantAwardedPercent"] = Int(gdsData["calgrantAwarded"]/gdsData["calgrantSubmitted"]*100) />
	<cfset gdsData["calgrantAwardedGingerbreadCount"] = Int(gdsData["calgrantAwarded"]/gdsData["calgrantSubmitted"]*10) />
	<cfset gdsData["calgrantCompletedGingerbreadCount"] = Int(gdsData["calgrantCompleted"]/gdsData["calgrantSubmitted"]*10) - gdsData["calgrantAwardedGingerbreadCount"] />
<cfelse>
	<cfset gdsData["calgrantCompletedPercent"] = 0 />
	<cfset gdsData["calgrantAwardedPercent"] = 0 />
	<cfset gdsData["calgrantAwardedGingerbreadCount"] = 0 />
	<cfset gdsData["calgrantCompletedGingerbreadCount"] = 0 />
</cfif>
<cfset gdsData["calgrantSubmittedGingerbreadCount"] = 10 - (gdsData["calgrantAwardedGingerbreadCount"] + gdsData["calgrantCompletedGingerbreadCount"]) />
<cfset gdsData["calgrantCountLeadingColsTop"] = (Int(gdsData["calgrantCompletedPercent"]/10)) - 1 />
<cfset gdsData["calgrantCountTrailingColsTop"] = 9 - gdsData["calgrantCountLeadingColsTop"] />
<cfset gdsData["calgrantCountLeadingColsBottom"] = (Int(gdsData["calgrantAwardedPercent"]/10)) - 1 />
<cfset gdsData["calgrantCountTrailingColsBottom"] = 9 - gdsData["calgrantCountLeadingColsBottom"] />

<!--- <style type="text/css">
	/*body {font-family: "Tw Cen MT", Futura, Helvetica, Arial;}*/
	.sideLabel {font-size: 1em; margin-bottom: 0; font-weight: 700;}
	.sideText {font-family: "Open Sans Condensed"; font-size: 1.6em; margin-bottom: 10px; font-weight: 300;} /* condensed */
	.statHeader {font-family: "Open Sans Condensed"; font-size: 1.8em; padding-bottom: 12px; font-weight: 700;} /* condensed */
	
	.default {color: #aad9e7;}
	.aqua {color: #55b4d0;}
	.blue {color: #2682d6;}
	.blueDark {color: #0f2a88;}
	.green {color: #5dba5d;}
	.greenDark {color: #417630;}
	.greyDark {color: #444444;}
	.greyLight {color: #aaa89a;}
	.white {color: #fff;}
	.goldDark {color: #C90;}
	
	#mainTable {width: 940px;}
	#leftCol {min-width: 160px; background-color: #55b4d0; vertical-align: top;}
	#leftColHeader {width: 160px; height: 247px; padding-top: 20px; color: gold; vertical-align: top; background-image: url('/assets/calgrants/ui/images/hdwd/left-col-header.png'); background-repeat: no-repeat; background-position: top; background-size: contain;}
	.logo {padding-bottom: 4px;}
	.howDid, .in20XX {font-family: "Open Sans Condensed"; font-size: 2em; font-weight: 700; text-align: center; line-height: 1em;} /* condensed */
	.weDo {font-family: "Open Sans Condensed"; font-size: 3em; font-weight: 700; text-align: center; line-height: 1em;} /* condensed */
	#leftColBody {width: 160px; height: 100%; padding: 0 10px; background-image: url('/assets/calgrants/ui/images/hdwd/logo.png'); background-repeat: repeat-x;}
	
	#bodyCol {width: 100%; background-color: #fff; padding: 20px 20px; vertical-align: top;}

	.smallTeardropRow td {font-size: 1.4em; font-weight: bold; color: #fff; text-align: center; vertical-align: middle; line-height: 1em;}
	.smallTeardropLabelRow td {height: 24px; font-size: 1.2em; text-align: center;}
	
	.gingerbreadTable {width: 280px;}
	.gingerbreadTopRow td, .gingerbreadBottomRow td  {width: 30px; height: 37px; font-size: 0.8em; font-weight: bold; text-align: center; vertical-align: middle; background-repeat: no-repeat; background-size: contain;}
	.gingerbreadUpperRow td, .gingerbreadLowerRow td {width: 30px; height: 66px;}
	
	.greenMarkerDown {background-image: url('/assets/calgrants/ui/images/hdwd/green-marker-down.png'); background-position: bottom;}
	.blueMarkerDown {background-image: url('/assets/calgrants/ui/images/hdwd/blue-marker-down.png'); background-position: bottom;}
	.defaultMarkerDown {background-image: url('/assets/calgrants/ui/images/hdwd/default-marker-down.png'); background-position: bottom;}
	.greenMarkerUp {background-image: url('/assets/calgrants/ui/images/hdwd/green-marker-up.png'); background-position: top;}
	.blueMarkerUp {background-image: url('/assets/calgrants/ui/images/hdwd/blue-marker-up.png'); background-position: top;}
	.defaultMarkerUp {background-image: url('/assets/calgrants/ui/images/hdwd/default-marker-up.png'); background-position: top;}
	
	.teardropDownSmall td {width: 87px; height: 87px; background-repeat: no-repeat; background-position: center; background-size: contain;}
	.defaultTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-down-small.png');}
	.aquaTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-down-small.png');}
	.blueTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-down-small.png');}
	.blueDarkTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-down-small.png');}
	.greenTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-down-small.png');}
	.greenDarkTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-down-small.png');}
	.greyDarkTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-down-small.png');}
	
	.teardrop td {width: 80px; height: 80px; color: #fff; font-size: 1em; font-weight: bold; line-height: 1em; background-repeat: no-repeat; background-position: center; background-size: contain;}
	.defaultTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-ne.png');}
	.aquaTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-ne.png');}
	.blueTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-ne.png');}
	.blueDarkTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-ne.png');}
	.greenTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-ne.png');}
	.greenDarkTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-ne.png');}
	.greyDarkTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-ne.png');}
	
	.teardropSmall td {width: 60px; height: 60px; color: #fff; font-size: 0.8em; font-weight: bold; line-height: 1em; background-repeat: no-repeat; background-position: center; background-size: contain;}
	.teardropHalfSmall td {height: 30px;}
	.defaultTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-ne-small.png');}
	.aquaTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-ne-small.png');}
	.blueTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-ne-small.png');}
	.blueDarkTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-ne-small.png');}
	.greenTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-ne-small.png');}
	.greenDarkTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-ne-small.png');}
	.greyDarkTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-ne-small.png');}
	.defaultTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-nw-small.png');}
	.aquaTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-nw-small.png');}
	.blueTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-nw-small.png');}
	.blueDarkTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-nw-small.png');}
	.greenTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-nw-small.png');}
	.greenDarkTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-nw-small.png');}
	.greyDarkTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-nw-small.png');}
	
	.teardropXSmall td {width: 40px; color: #fff; font-weight: bold; line-height: 1em; background-repeat: no-repeat; background-position: center; background-size: contain;}
	.defaultTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-nw-xsmall.png');}
	.aquaTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-nw-xsmall.png');}
	.blueTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-nw-xsmall.png');}
	.blueDarkTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-nw-xsmall.png');}
	.greenTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-nw-xsmall.png');}
	.greenDarkTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-nw-xsmall.png');}
	.greyDarkTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-nw-xsmall.png');}

	.tearpanel td {width: 33px; height: 110px; color: #fff; font-size: 0.8em; font-weight: bold; line-height: 1em; background-repeat: no-repeat; background-size: contain;}
	.femaleTearpanel {background-image: url('/assets/calgrants/ui/images/hdwd/female-tearpanel.png'); background-position: top;}
	.maleTearpanel {background-image: url('/assets/calgrants/ui/images/hdwd/male-tearpanel.png'); background-position: bottom;}
	
	.femaleGreen {background-image: url('/assets/calgrants/ui/images/hdwd/female-green.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
	.femaleBlue {background-image: url('/assets/calgrants/ui/images/hdwd/female-blue.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
	.femaleDefault {background-image: url('/assets/calgrants/ui/images/hdwd/female-default.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
	.maleGreen {background-image: url('/assets/calgrants/ui/images/hdwd/male-green.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
	.maleBlue {background-image: url('/assets/calgrants/ui/images/hdwd/male-blue.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
	.maleDefault {background-image: url('/assets/calgrants/ui/images/hdwd/male-default.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}

	.ratingPercentRow td {font-family: "Open Sans Condensed"; font-size: 4em; font-weight: 700; text-align: center; line-height: 1em;} /* condensed */
	.ratingPercentLabelRow td {font-size: 1.4em; text-align: center; line-height: 1em;}
	span.ratingPercentSymbol {font-size: 0.8em;}
	.legendTable td {font-size: 1em; padding: 2px 2px; line-height: 1em; color: #aaa89a;}
	#genderPercentages td {color: #fff; font-size: 0.8em; font-weight: bold; text-align: center; vertical-align: middle;}
	.baseChartContainer {width: 200px; height: 200px;}
	.trendChartLabel {font-size: 1em; line-height: 1em; color: #aaa89a; height: 40px; text-align: right; vertical-align: bottom;}
	.trendChartContainer {width: 320px; height: 200px;}
	
	.dollarArrow td {height: 80px;}
	.arrow {width: 210px; background-repeat: no-repeat; background-position: left; background-size: contain; font-size: 0.8em; color: #fff; padding-left: 4px; line-height: 1em;}
	.blueArrowRight {background-image: url('/assets/calgrants/ui/images/hdwd/blue-arrow-right.png');}
	.greenArrowRight {background-image: url('/assets/calgrants/ui/images/hdwd/green-arrow-right.png');}
	.dollarAward {font-family: "Open Sans Condensed"; font-size: 2.6em; font-weight: 700; color: #5dba5d; text-align: center;} /* condensed */
</style> --->

<!DOCTYPE html>
<html>
<head>
	<link href="//fonts.googleapis.com/css?family=Cabin:400,500,600,700|Cabin+Condensed:400,500,600,700|Open+Sans:300,400,600,700,800|Open+Sans+Condensed:300,700&effect=fire-animation" rel="stylesheet" type="text/css" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Cash for College How Did We Do Report</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Cash for College How Did We Do Report">
	<meta name="author" content="Syntric">
	<!--- <link href="#request.pathToBootstrapCSS#" rel="stylesheet" /> --->
	<link href="/assets/kendoui/styles/kendo.common.min.css" rel="stylesheet" />
	<link href="/assets/kendoui/styles/kendo.default.min.css" rel="stylesheet" />
	<!--- <link href="/assets/calgrants/ui/common.css" rel="stylesheet" /> --->
	<link href="/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
	<link href="/assets/font-awesome/css/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
	<script src="/assets/jquery/jquery.min.js" type="text/javascript"></script>
	<!--- <script src="#request.pathToBootstrap#" type="text/javascript"></script> --->
	<script src="/assets/kendoui/js/kendo.all.min.js" type="text/javascript"></script>
	<!--- <script src="/assets/calgrants/ui/common.js" type="text/javascript"></script> --->
	<style type="text/css">
		body {font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0; padding: 0;}
		.sideLabel {font-size: 0.9em; margin-bottom: 0; font-weight: 700;}
		.sideText {font-family: "Open Sans Condensed"; font-size: 1.4em; margin-bottom: 10px; font-weight: 400;} /* condensed */
		.statHeader {font-family: "Cabin Condensed"; font-size: 1.8em; padding-bottom: 12px; font-weight: 700;} /* condensed */
		
		.default {color: #aad9e7;}
		.aqua {color: #55b4d0;}
		.blue {color: #2682d6;}
		.blueDark {color: #0f2a88;}
		.green {color: #5dba5d;}
		.greenDark {color: #417630;}
		.greyDark {color: #444444;}
		.greyLight {color: #aaa89a;}
		.white {color: #fff;}
		.goldDark {color: #C90;}
		hr {
			border: 0;
			border-bottom: 3px solid #ccc;
			background: #fff;
		}
		
		#mainTable {width: 1200px;}
		#leftCol {min-width: 160px; padding-top: 12px; background-image: url('/assets/calgrants/ui/images/hdwd/left-col-bg.png'); background-repeat: repeat-y; background-size: contain;}
		#bodyCol {width: 100%; background-color: #fff; padding-top: 12px; padding-left: 20px;}
		
		
		#leftColHeader {width: 160px; height: 247px; color: gold; vertical-align: top; background-image: url('/assets/calgrants/ui/images/hdwd/left-col-header.png'); background-repeat: no-repeat; background-size: contain;}
		#leftColBody {width: 160px; padding: 0 10px;}
		
		.logo {padding-bottom: 4px;}
		.howDid {font-family: "Cabin Condensed"; font-size: 2.4em; font-weight: 500; text-align: center; line-height: 0.9em;} /* condensed */
		.weDo {font-family: "Cabin Condensed"; font-size: 3.3em; font-weight: 500; text-align: center; line-height: 0.9em;} /* condensed */
		.in20XX {font-family: "Cabin Condensed"; font-size: 2.8em; font-weight: 500; text-align: center; line-height: 0.9em;} /* condensed */
	
		.smallTeardropRow td {font-size: 1.4em; font-weight: 600; color: #fff; text-align: center; vertical-align: middle; line-height: 1em;}
		.smallTeardropLabelRow td {height: 24px; font-size: 1.2em; text-align: center;}
		
		.gingerbreadTable {width: 280px;}
		<cfif baseResponses lt 10000>
			.gingerbreadTopRow td, .gingerbreadBottomRow td  {width: 30px; height: 40px; font-size: 0.7em; font-weight: 700; line-height: 1em; text-align: center;}
		<cfelse>
			.gingerbreadTopRow td, .gingerbreadBottomRow td  {width: 30px; height: 40px; font-size: 0.6em; font-weight: 600; line-height: 1em; text-align: center;}
		</cfif>
		.gingerbreadUpperRow td, .gingerbreadLowerRow td {width: 30px; height: 66px;}
		
		/*.greenMarkerDown {background-image: url('/assets/calgrants/ui/images/hdwd/green-marker-down.png'); background-position: bottom;}
		.blueMarkerDown {background-image: url('/assets/calgrants/ui/images/hdwd/blue-marker-down.png'); background-position: bottom;}
		.defaultMarkerDown {background-image: url('/assets/calgrants/ui/images/hdwd/default-marker-down.png'); background-position: bottom;}
		.greenMarkerUp {background-image: url('/assets/calgrants/ui/images/hdwd/green-marker-up.png'); background-position: top;}
		.blueMarkerUp {background-image: url('/assets/calgrants/ui/images/hdwd/blue-marker-up.png'); background-position: top;}
		.defaultMarkerUp {background-image: url('/assets/calgrants/ui/images/hdwd/default-marker-up.png'); background-position: top;}*/
	
		.teardropDownSmall td {width: 87px; height: 87px; background-repeat: no-repeat; background-position: center; background-size: contain;}
		.defaultTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-down-small.png');}
		.aquaTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-down-small.png');}
		.blueTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-down-small.png');}
		.blueDarkTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-down-small.png');}
		.greenTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-down-small.png');}
		.greenDarkTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-down-small.png');}
		.greyDarkTeardropDownSmall {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-down-small.png');}
		
		.teardrop td {width: 80px; height: 80px; color: #fff; font-size: 1em; line-height: 1em; background-repeat: no-repeat; background-position: center; background-size: contain;}
		.defaultTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-ne.png');}
		.aquaTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-ne.png');}
		.blueTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-ne.png');}
		.blueDarkTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-ne.png');}
		.greenTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-ne.png');}
		.greenDarkTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-ne.png');}
		.greyDarkTeardropNE {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-ne.png');}
		
		<cfif baseResponses lt 10000>
			.teardropSmall td {width: 60px; height: 60px; color: #fff; font-size: 0.7em; font-weight: 600; line-height: 1em; background-repeat: no-repeat; background-position: center; background-size: contain;}
			.upsize150 {font-size: 1.5em; font-weight: 700;}
		<cfelse>
			.teardropSmall td {width: 60px; height: 60px; color: #fff; font-size: 0.7em; font-weight: 600; line-height: 1em; background-repeat: no-repeat; background-position: center; background-size: contain;}
			.upsize150 {font-size: 1.4em; font-weight: 700;}
		</cfif>
	
		.teardropHalfSmall td {height: 30px;}
		.defaultTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-ne-small.png');}
		.aquaTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-ne-small.png');}
		.blueTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-ne-small.png');}
		.blueDarkTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-ne-small.png');}
		.greenTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-ne-small.png');}
		.greenDarkTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-ne-small.png');}
		.greyDarkTeardropNESmall {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-ne-small.png');}
		.defaultTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-nw-small.png');}
		.aquaTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-nw-small.png');}
		.blueTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-nw-small.png');}
		.blueDarkTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-nw-small.png');}
		.greenTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-nw-small.png');}
		.greenDarkTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-nw-small.png');}
		.greyDarkTeardropNWSmall {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-nw-small.png');}
		
		.teardropXSmall td {width: 40px; color: #fff; line-height: 1em; background-repeat: no-repeat; background-position: center; background-size: contain;}
		.defaultTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/default-teardrop-nw-xsmall.png');}
		.aquaTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/aqua-teardrop-nw-xsmall.png');}
		.blueTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-teardrop-nw-xsmall.png');}
		.blueDarkTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/blue-dark-teardrop-nw-xsmall.png');}
		.greenTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-teardrop-nw-xsmall.png');}
		.greenDarkTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/green-dark-teardrop-nw-xsmall.png');}
		.greyDarkTeardropNWXSmall {background-image: url('/assets/calgrants/ui/images/hdwd/grey-dark-teardrop-nw-xsmall.png');}
	
		.tearpanel td {width: 33px; height: 125px; color: #fff; font-size: 0.8em; font-weight: 600; line-height: 1em; background-repeat: no-repeat; background-size: contain;}
		.femaleTearpanel {background-image: url('/assets/calgrants/ui/images/hdwd/female-tearpanel.png'); background-position: top;}
		.maleTearpanel {background-image: url('/assets/calgrants/ui/images/hdwd/male-tearpanel.png'); background-position: bottom;}
		
		.femaleGreen {background-image: url('/assets/calgrants/ui/images/hdwd/female-green.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
		.femaleBlue {background-image: url('/assets/calgrants/ui/images/hdwd/female-blue.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
		.femaleDefault {background-image: url('/assets/calgrants/ui/images/hdwd/female-default.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
		.maleGreen {background-image: url('/assets/calgrants/ui/images/hdwd/male-green.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
		.maleBlue {background-image: url('/assets/calgrants/ui/images/hdwd/male-blue.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
		.maleDefault {background-image: url('/assets/calgrants/ui/images/hdwd/male-default.png'); background-repeat: no-repeat; background-position: center; background-size: contain;}
	
		.ratingPercentRow td {font-family: "Open Sans Condensed"; font-size: 4em; font-weight: 700; text-align: center; line-height: 1em; padding: 6px;} /* condensed */
		.ratingPercentLabelRow td {font-family: "Cabin"; font-size: 1.4em; font-weight: 6; text-align: center; line-height: 1em; padding: 6px;}
		span.ratingPercentSymbol {font-size: 0.8em;}
		.legendTable td {font-size: 0.8em; padding: 4px 2px; line-height: 1em; font-size: 500; color: #aaa89a;}
		#genderPercentages td {color: #fff; font-size: 0.8em; font-weight: bold; text-align: center; vertical-align: middle;}
		.baseChartContainer {width: 200px; height: 200px;}
		.trendChartLabel {font-size: 1em; line-height: 1em; color: #aaa89a; height: 40px; text-align: right; vertical-align: bottom;}
		.trendChartContainer {width: 320px; height: 200px;}
		
		.dollarArrow td {height: 80px;}
		.arrow {width: 210px; background-repeat: no-repeat; background-position: left; background-size: contain; font-size: 0.8em; color: #fff; padding-left: 6px; line-height: 1em;}
		.blueArrowRight {background-image: url('/assets/calgrants/ui/images/hdwd/blue-arrow-right.png');}
		.greenArrowRight {background-image: url('/assets/calgrants/ui/images/hdwd/green-arrow-right.png');}
		.dollarAward {font-family: "Open Sans Condensed"; font-size: 2.6em; font-weight: 700; color: #5dba5d; text-align: center;} /* condensed */
		
		.mission {width: 160px; padding: 10px 10px; font-size: 0.7em; color: #fff; line-height: 1.1em; background-image: url('/assets/calgrants/ui/images/hdwd/left-col-bg.png'); background-repeat: repeat-y; background-size: contain;}
	</style>
	
	<script type="application/javascript">
	<!--
		<cfoutput>
			var programYears = [#QuotedValueList(getProgramYears.Program_Year)#];
			var baseData = #SerializeJSON(baseData)#;
			var trendData = #SerializeJSON(trendData)#;
			//var colors = #SerializeJSON(colors)#;
		</cfoutput>
		
		var donutLabelTemplate = "#= dataItem.percent#%";
		var donutLegendTemplate = "#= dataItem.name#";
		
		var pieLabelTemplate = "#= dataItem.name# - #= dataItem.percent#%";
		var pieLegendTemplate = "#= dataItem.name# - #= dataItem.percent#%";
		var pieTooltipTemplate = "#= dataItem.name# - #= dataItem.percent#";
		var donutTooltipTemplate = "#= dataItem.count# responses = #= dataItem.percent#%";
		var barLabelTemplate = "#= dataItem.name# - #= dataItem.percent#%";
		var barLegendTemplate = "#= text#";
		var barTooltipTemplate = "#= dataItem.count# responses = #= dataItem.percent#%";
		var donutLabelFont = "9px Arial,Helvetical,sans-serif";
		var labelFont = "9px Arial,Helvetical,sans-serif";
		var legendFont = "9px Arial,Helvetical,sans-serif";
		var tooltipFont = "9px Arial,Helvetical,sans-serif";
		/*var d = [
			{name: "Excellent", data: [80, null, 85, 90]},
			{name: "Good", data: [15, null, 10, 5]},
			{name: "Fair", data: [3, null, 3, 3]},
			{name: "Poor", data: [2, null, 2, 2]}
		];*/
		getBaseQuestionData = function(q) {
			var d = baseData[q]["answers"];
			var r = [];
			for (var k in d) {
				if (d[k]["count"] > 0) {
					var s = {};
					if (q == 7) {
						if (d[k]["answer"] == true) {
							s["name"] = "Senior";
						} else if (d[k]["answer"] == false) {
							s["name"] = "Non-senior";
						} else {
							s["name"] = "Family member of senior";
						}
					} else {
						if (d[k]["answer"] == true) {
							s["name"] = "Yes";
						} else if (d[k]["answer"] == false) {
							s["name"] = "No";
						} else {
							s["name"] = d[k]["answer"];
						}
					}
					s["count"] = parseInt(d[k]["count"]);
					s["percent"] = parseInt(d[k]["percent"]);
					r.push(s);
				}
			}
			console.log(r);
			return r;
		}
		getTrendQuestionData = function(q) {
			var d = trendData[q]["answers"];
			var r = [];
			for (var k in d) {
				var s = {};
				s["counts"] = [];
				s["percents"] = [];
				s["data"] = [];
				for (var j=0; j<d[k].length; j++) {
					s["name"] = d[k][j]["answer"];
					s["counts"].push(parseInt(d[k][j]["count"]));
					s["percents"].push(parseInt(d[k][j]["percent"]));
					s["data"].push(parseInt(d[k][j]["percent"]));
				}
				r.push(s);
			}
			console.log(r);
			return r;
		}
		// use as theme: 'newTheme'
		kendo.dataviz.ui.registerTheme("hdwd", {
			"chart": {
				"title": {
					"color": "#000000"
				},
				"legend": {
					"labels": {
						"color": "#aaa89a"
					}
				},
				"chartArea": {
					"background": "rgba(0, 0, 0, 0)"
				},
				"seriesDefaults": {
					"labels": {
						"color": "#aaa89a"
					}
				},
				"axisDefaults": {
					"line": {
						"color": "#aaa89a"
					},
					"labels": {
						"color": "#aaa89a"
					},
					"minorGridLines": {
						"color": "#aaa89a"
					},
					"majorGridLines": {
						"color": "#aaa89a"
					},
					"title": {
						"color": "#aaa89a"
					}
				},
				"seriesColors": [
					"#1a307b",
					"#5bb65e",
					"#2682d6",
					"#55b4d0",
					"#417630",
					"#444444"
				],
				"tooltip": {}
			},
			/*"gauge": {
				"pointer": {
					"color": "#10c4b2"
				},
				"scale": {
					"rangePlaceholderColor": "#cdcdcd",
					"labels": {
						"color": "#4c5356"
					},
					"minorTicks": {
						"color": "#4c5356"
					},
					"majorTicks": {
						"color": "#4c5356"
					},
					"line": {
						"color": "#4c5356"
					}
				}
			}*/
		});
		colors = ["#2682d6","#5dba5d","#0f2a88","#55b4d0","#417630","#aad9e7","#444444","#2682d6","#5dba5d","#0f2a88","#55b4d0","#417630","#aad9e7","#444444","#2682d6","#5dba5d","#0f2a88","#55b4d0","#417630","#aad9e7","#444444"];
		/*parseQuestions = function(questions) {
			for (var q = 0; q < questions.length; q++) {
				questions[q].QUESTION_NUMBER = parseInt(questions[q].QUESTION_NUMBER);
				questions[q].RESPONSE_COUNT = parseInt(questions[q].RESPONSE_COUNT);
				questions[q].MULTI_RESPONSE_COUNT = parseInt(questions[q].MULTI_RESPONSE_COUNT);
				questions[q].NO_RESPONSE_COUNT = parseInt(questions[q].NO_RESPONSE_COUNT);
			}
			return questions;
		}
		parseAnswers = function(answers) {
			for (var a = 0; a < answers.length; a++) {
				if (answers[a].ANSWER === true) {
					answers[a].ANSWER = "Yes ";
				} else if (answers[a].ANSWER === false) {
					answers[a].ANSWER = "No ";
				}
				answers[a].ANSWER_NUMBER = parseInt(answers[a].ANSWER_NUMBER);
				answers[a].RESPONSE_COUNT = parseInt(answers[a].RESPONSE_COUNT);
				answers[a].RESPONSE_PERCENT = parseFloat(answers[a].RESPONSE_PERCENT);
				//answers[a].RESPONSE_OTHER = answers[a].ANSWER_VALUES.toString();
				answers[a].EXPLODE = false;
			}
			return answers;
		}*/
		renderDonutChart = function(q) {
			$("#q" + q + "DonutChart").kendoChart({
				series: [{
					type: "donut",
					data: getBaseQuestionData(q),
					field: "percent",
					categoryField: "name",
					overlay: {gradient: "none"},
					startAngle: 90,
					labels: {
						align: "circle",
						//background: "#fff",
						color: "#aaa89a",
						distance: 16,
						//padding: 0,
						//margin: 0,
						//font: donutLabelFont,
						position: "outsideEnd",
						template: donutLabelTemplate,
						visible: true
					},
					border: {width: 2, color: "#fff"}
				}],
				chartArea: {
					width: 200,
					height: 180,
					margin: 0
				},
				seriesColors: colors,
				legend: {
					visible: false,
					position: "bottom",
					//background: "#c2c2c2",
					labels: {
						font: donutLabelFont,
						template: donutLegendTemplate
					}
				},
				tooltip: {
					visible: false,
					//font: tooltipFont,
					template: donutTooltipTemplate
				}
			})
			/*if (q == 6) {
				var chart = $("#q" + q + "DonutChart").data("kendoChart");
				var svg = chart.svg();
				console.log(svg);
			}*/
		}
		renderTrendLineChart = function(q) {
			$("#q" + q + "TrendLineChart").kendoChart({
				legend: {visible: false},
				seriesDefaults: {
					type: "line",
					opacity: 1
				},
				series: getTrendQuestionData(q),
				seriesColors: colors,
				chartArea: {
					width: 320,
					height: 200
				},
				valueAxis: {
					min: 0,
					max: 100,
					labels: {format: "{0}%", color: "#aaa89a"},
					line: {visible: false}, 
					majorUnit: 25,
					minorUnit: 12.5,
					majorGridLines: {visible: true, width: 1, dashType: "dot"},
					minorGridLines: {visible: true, width: 1, dashType: "dot"}
				},
				categoryAxis: {
					categories: programYears,
					labels: {
						template: function(d) {
							return d.value.split("-")[1];
						},
						color: "#aaa89a",
						rotation: -45
					},
					line: {visible: false},
					majorGridLines: {visible: false},
					minorGridLines: {visible: false}	
				}
			})
		}
		renderTrendAreaChart = function(q) {
			$("#q" + q + "TrendAreaChart").kendoChart({
				legend: {visible: false},
				seriesDefaults: {
					type: "area",
					opacity: 1
				},
				series: getTrendQuestionData(q),
				seriesColors: colors,
				chartArea: {
					width: 320,
					height: 200
				},
				valueAxis: {
					min: 0,
					max: 100,
					labels: {format: "{0}%", color: "#aaa89a"},
					line: {visible: false}, 
					majorUnit: 25,
					minorUnit: 12.5,
					majorGridLines: {visible: true, width: 1, dashType: "dot"},
					minorGridLines: {visible: true, width: 1, dashType: "dot"}
				},
				categoryAxis: {
					categories: programYears,
					labels: {
						template: function(d) {
							return d.value.split("-")[1];
						},
						color: "#aaa89a",
						rotation: -45
					},
					line: {visible: false},
					majorGridLines: {visible: false},
					minorGridLines: {visible: false}	
				}
			})
		}
		getChartImage = function(q) {
			var chart = $("#q11Chart").data("kendoChart");
			var img = chart.imageDataURL();
			console.log(img);
			//document.location.href = img;
		}
		/*renderBarChart = function(q) {
			var question = questions[q-1];
			var answers = parseAnswers(question.ANSWERS);
			$("#q" + q + "Chart").kendoChart({
				//theme: $(document).data("kendoSkin") || "metro",
				dataSource: answers,
				plotArea: {
					margin: {
						right: 200
					}
				},
				series: [{
					type: "bar",
					field: "RESPONSE_PERCENT",
					categoryField: "ANSWER",
					labels: {visible: true, font: labelFont, template: barLabelTemplate, position: "outsideEnd"},
					missingValue: "zero",
					gap: 0.4,
					spacing: 0.2,
					markers: {visible: true, border: {width: 2, size: 6}},
					padding: 50
				}],
				valueAxis: {
					title: {visible: false, text: "valueAxis"},
					labels: {template: "#= value#%"},
					majorGridLines: {visible: true, color: "gray"},
					majorTicks: {visible: true, color: "gray"},
					minorGridLines: {visible: false, color: "silver"},
					minorTicks: {visible: false, color: "silver"},
					plotBands: [{
						from: 49,
						to: 51,
						color: "gray",
						opacity: 0.3
					}]
				},
				categoryAxis: {
					title: {visible: false, text: "categoryAxis"},
					majorGridLines: {visible: false},
					majorTicks: {visible: false}
				},
				legend: {
					visible: false,
					position: "left",
					labels: {font: legendFont, template: barLegendTemplate}
				},
				tooltip: {
					visible: true,
					font: tooltipFont,
					template: barTooltipTemplate
				}
			})
		}*/
		$(function() {
			renderDonutChart(6);
			renderDonutChart(7);
			renderDonutChart(10);
			renderDonutChart(12);
			renderTrendLineChart(1);
			renderTrendLineChart(11);
			renderTrendAreaChart(7);
			renderTrendLineChart(12);
			renderTrendLineChart(6);
			renderTrendLineChart(10);
		})
	//-->
	</script>
</head>

<body>

<cfdocument format="PDF" backgroundvisible="yes" fontembed="yes" marginbottom="0" marginleft="0" marginright="0" margintop="0" pageheight="11" pagewidth="8.5" unit="in">  
<cfoutput>
	<table id="mainTable" border="0" cellpadding="0" cellspacing="0">
		<tr valign="top">
			<td id="leftCol">
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td id="leftColHeader" align="center">
						
							<table border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td class="logo" align="center"><img src="/assets/calgrants/ui/images/hdwd/cash-for-college-logo.png" /></td>
								<tr>
									<td class="howDid font-effect-fire-animiation">HOW DID</td>
								</tr>
								<tr>
									<td class="weDo font-effect-fire-animiation">WE DO</td>
								</tr>
								<tr>
									<td class="in20XX font-effect-fire-animiation">IN 2013?</td>
								</tr>
							</table>
							
						</td>
					</tr>
					<tr>
						<td id="leftColBody">
							<div class="sideLabel greyDark">Total Attendees</div>
							<div class="sideText white">#baseResponses#</div>
							<cfif IsDefined("site")>
								<div class="sideLabel greyDark">Site Name</div>
								<div class="sideText white">#site#</div>
							</cfif>
							<cfif IsDefined("city")>
								<div class="sideLabel greyDark">City</div>
								<div class="sideText white">#city#</div>
							</cfif>
							<cfif IsDefined("county")>
								<div class="sideLabel greyDark">County</div>
								<div class="sideText white">#county#</div>
							</cfif>
							<cfif IsDefined("region")>
								<div class="sideLabel greyDark">Region</div>
								<div class="sideText white">#region#</div>
							</cfif>
							<cfif IsDefined("siteType")>
								<div class="sideLabel greyDark">Site Type</div>
								<div class="sideText white">#siteType#</div>
							</cfif>
							<cfif IsDefined("siteSince")>
								<div class="sideLabel greyDark">Site Since</div>
								<div class="sideText white">#siteSince#</div>
							</cfif>
							<cfif IsDefined("computerBasedWorkshop")>
								<div class="sideLabel greyDark">Computer Based Workshop</div>
								<div class="sideText white">#YesNoFormat(computerBasedWorkshop)#</div>
							</cfif>
							<cfif IsDefined("organization")>
									<div class="sideLabel greyDark">Lead Organization</div>
									<div class="sideText white">#organization#</div>
							</cfif>
							<cfif IsDefined("organizationSince")>
								<div class="sideLabel greyDark">Organization Since</div>
								<div class="sideText white">#organizationSince#</div>
							</cfif>
							<cfif IsDefined("qualifiedScholarship")>
								<div class="sideLabel greyDark">Workshop Qualified to Offer Cash for College Scholarship?</div>
								<div class="sideText white">#YesNoFormat(qualifiedScholarship)#</div>
							</cfif>
							<cfif IsDefined("followUpRequests") and IsDefined("followUpRequestsPct")>
								<div class="sideLabel greyDark">Follow-Up Requests</div>
								<div class="sideText white">#followUpRequests# (#Int(followUpRequestsPct)#%)</div>
							</cfif>
							<cfif IsDefined("followedUp")>
								<div class="sideLabel greyDark">Used Follow-Up Platform?</div>
								<div class="sideText white"><cfif followedUp gt 0>Yes (#followedUp#)<cfelse>No</cfif></div>
							</cfif>
						</td>
					</tr>
					<tr>
						<td class="mission">
							Cash for College is California's public-private partnership FAFSA/CA Dream Act completion program administered by the California Student Aid Commission and its regional and local partners
						</td>
					</tr>
					
				</table>
			</td>
			<td id="bodyCol">

				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td width="49%" height="40" class="statHeader">FAFSA/DREAM APPLICATIONS</td>
						<td width="2%"></td>
						<td width="49%" height="40" class="statHeader">CAL GRANT APPLICATIONS</td>
					</tr>
					<tr valign="middle">
						<td colspan="3">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="49%">
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td>
													<!--- gingerbread --->
													<table id="fafsaCounts" border="0" cellpadding="0" cellspacing="0" class="gingerbreadTable">
														<tr class="gingerbreadTopRow">
															<cfif gdsData.fafsaCountLeadingCols gt 0>
																<td colspan="#gdsData.fafsaCountLeadingCols#">&nbsp;</td>
															</cfif>
															<td class="blueMarkerDown">#NumberFormat(gdsData.fafsaCompleted)#<br /><i class="icon-caret-down icon-3x blue"></i></td>
															<cfif gdsData.fafsaCountTrailingCols gt 0>
																<td colspan="#gdsData.fafsaCountTrailingCols#">&nbsp;</td>
															</cfif>
														</tr>
														<tr class="gingerbreadUpperRow">
															<cfset gender = "female">
															<cfloop index="i" from="1" to="#gdsData.fafsaCompletedGingerbreadCount#">
																<td class="#gender#Blue"></td>
																<cfif gender eq "female">
																	<cfset gender = "male" />
																<cfelse>
																	<cfset gender = "female">
																</cfif>
															</cfloop>
															<cfloop index="i" from="1" to="#gdsData.fafsaSubmittedGingerbreadCount#">
																<td class="#gender#Default"></td>
																<cfif gender eq "female">
																	<cfset gender = "male" />
																<cfelse>
																	<cfset gender = "female">
																</cfif>
															</cfloop>
														</tr>
														<tr class="gingerbreadBottomRow">
															<td colspan="10"></td>
															<!--- <td colspan="4"></td>
															<td colspan="1"><i class="icon-caret-up icon-3x blue"></i><br />9999</td>
															<td colspan="5"></td> --->
														</tr>
													</table>
												</td>
												<td width="60">
													<!--- teardrops --->
													<table id="fafsaPercentages" border="0" cellpadding="0" cellspacing="0">
														<tr class="teardropHalfSmall">
															<td></td>
														</tr>
														<tr class="teardropSmall">
															<td valign="middle" align="center" class="aquaTeardropNWSmall"><span class="upsize150">#NumberFormat(gdsData.fafsaSubmitted)#</span><br />Submitted</td>
														</tr>
														<tr class="teardropSmall">
															<td valign="middle" align="center" class="blueTeardropNESmall"><span class="upsize150">#gdsData.fafsaCompletedPercent#%</span><br />Completed</td>
														</tr>
														<tr class="teardropHalfSmall">
															<td></td>
														</tr>
													</table>
												</td>
											</tr>
											<tr>
												<td colspan="2">
													<!--- arrow --->
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<tr class="dollarArrow">
															<td class="blueArrowRight arrow">
																Pell grant funds available<br />
																based on average award
															</td>
															<td class="dollarAward" nowrap="nowrap">$#NumberFormat(gdsData.fafsaDollarsAwarded)#</td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
									<td width="2%"></td>
									<td width="49%">
										<table border="0" cellpadding="0" cellspacing="0" width="100%">
											<tr>
												<td>
													<!--- gingerbread --->
													<table id="calgrantCounts" border="0" cellpadding="0" cellspacing="0" class="gingerbreadTable">
														<tr class="gingerbreadTopRow">
															<cfif gdsData.calgrantCountLeadingColsTop gt 0>
																<td colspan="#gdsData.calgrantCountLeadingColsTop#">&nbsp;</td>
															</cfif>
															<td class="blueMarkerDown">#NumberFormat(gdsData.calgrantCompleted)#<br /><i class="icon-caret-down icon-3x blue"></i></td>									
															<cfif gdsData.calgrantCountTrailingColsTop gt 0>
																<td colspan="#gdsData.calgrantCountTrailingColsTop#">&nbsp;</td>
															</cfif>
														</tr>
														<tr class="gingerbreadUpperRow">
															<cfset gender = "female">
															<cfloop index="i" from="1" to="#gdsData.calgrantAwardedGingerbreadCount#">
																<td class="#gender#Green"></td>
																<cfif gender eq "female">
																	<cfset gender = "male" />
																<cfelse>
																	<cfset gender = "female">
																</cfif>
															</cfloop>
															<cfloop index="i" from="1" to="#gdsData.calgrantCompletedGingerbreadCount#">
																<td class="#gender#Blue"></td>
																<cfif gender eq "female">
																	<cfset gender = "male" />
																<cfelse>
																	<cfset gender = "female">
																</cfif>
															</cfloop>
															<cfloop index="i" from="1" to="#gdsData.calgrantSubmittedGingerbreadCount#">
																<td class="#gender#Default"></td>
																<cfif gender eq "female">
																	<cfset gender = "male" />
																<cfelse>
																	<cfset gender = "female">
																</cfif>
															</cfloop>
														</tr>
														<tr class="gingerbreadBottomRow">
															<cfif gdsData.calgrantCountLeadingColsBottom gt 0>
																<td colspan="#gdsData.calgrantCountLeadingColsBottom#">&nbsp;</td>
															</cfif>
															<td class="greenMarkerUp"><i class="icon-caret-up icon-3x green"></i><br />#NumberFormat(gdsData.calgrantAwarded)#</td>	
															<cfif gdsData.calgrantCountTrailingColsBottom gt 0>
																<td colspan="#gdsData.calgrantCountTrailingColsBottom#">&nbsp;</td>
															</cfif>
														</tr>
													</table>
												</td>
												<td width="60">
													<!--- teardrops --->
													<table id="calgrantPercentages" border="0" cellpadding="0" cellspacing="0">
														<tr class="teardropSmall">
															<td valign="middle" align="center" class="aquaTeardropNWSmall"><span class="upsize150">#NumberFormat(gdsData.calgrantSubmitted)#</span><br />Submitted</td>
														</tr>
														<tr class="teardropSmall">
															<td valign="middle" align="center" class="blueTeardropNESmall"><span class="upsize150">#gdsData.calgrantCompletedPercent#%</span><br />Completed</td>
														</tr>
														<tr class="teardropSmall">
															<td valign="middle" align="center" class="greenTeardropNESmall"><span class="upsize150">#gdsData.calgrantAwardedPercent#%</span><br />Awarded</td>
														</tr>
													</table>
												</td>
											</tr>
											<tr>
												<td colspan="2">
													<!--- arrow --->
													<table border="0" cellpadding="0" cellspacing="0" width="100%">
														<tr class="dollarArrow">
															<td class="blueArrowRight arrow">
																Cal Grant funds offered<br />
																to qualifying students
															</td>
															<td class="dollarAward">$#NumberFormat(gdsData.calgrantDollarsAwarded)#</td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<hr />
				
				<cfif ListLen(programYears) lte 1>

					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="49%" height="40" class="statHeader">WORKSHOP RATING</td>
							<td width="2%"></td>
							<td width="49%" height="40" class="statHeader">ATTENDANCE by GENDER</td>
						</tr>
						<tr valign="middle">
							<td colspan="3">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="49%">
											<!--- rating --->
											<table id="workshopRating" border="0" cellpadding="0" cellspacing="0" width="100%">
												<tr class="ratingPercentRow">
													<td class="ratingPercent blue" width="25%">#Int(baseData[1].answers[1].percent)#<span class="ratingPercentSymbol">%</span></td>
													<td class="ratingPercent green" width="25%">#Int(baseData[1].answers[2].percent)#<span class="ratingPercentSymbol">%</span></td>
													<td class="ratingPercent blueDark" width="25%">#Int(baseData[1].answers[3].percent)#<span class="ratingPercentSymbol">%</span></td>
													<td class="ratingPercent aqua" width="25%">#Int(baseData[1].answers[4].percent)#<span class="ratingPercentSymbol">%</span></td>
												</tr>
												<tr class="ratingPercentLabelRow">
													<td>Excellent</td>
													<td>Good</td>
													<td>Fair</td>
													<td>Poor</td>
												</tr>
											</table>
										</td>
										<td width="2%">&nbsp;</td>
										<td width="49%">
											<table border="0" cellpadding="0" cellspacing="0" width="100%">
												<tr>
													<td>
														<!--- gingerbread --->
														<table id="genderCounts" border="0" cellpadding="0" cellspacing="0" class="gingerbreadTable" width="100%">
															<tr class="gingerbreadTopRow">
																<cfif genderData.femaleCountLeadingCols gt 0>
																	<td colspan="#genderData.femaleCountLeadingCols#">&nbsp;</td>
																</cfif>
																<td class="greenMarkerDown">#NumberFormat(genderData.femaleCount)#<br /><i class="icon-caret-down icon-3x green"></i></td>
																<cfif genderData.femaleCountTrailingCols gt 1>
																	<td colspan="#genderData.femaleCountTrailingCols#">&nbsp;</td>
																</cfif>
															</tr>
															<tr class="gingerbreadUpperRow">
																<cfloop index="i" from="1" to="#genderData.femaleOnCount#">
																	<td class="femaleGreen"></td>
																</cfloop>
																<cfloop index="i" from="1" to="#genderData.femaleOffCount#">
																	<td class="femaleDefault"></td>
																</cfloop>
															</tr>
															<tr class="gingerbreadLowerRow">
																<cfloop index="i" from="1" to="#genderData.maleOnCount#">
																	<td class="maleBlue"></td>
																</cfloop>
																<cfloop index="i" from="1" to="#genderData.maleOffCount#">
																	<td class="maleDefault"></td>
																</cfloop>
															</tr>
															<tr class="gingerbreadBottomRow">
																<cfif genderData.maleCountLeadingCols gt 0>
																	<td colspan="#genderData.maleCountLeadingCols#">&nbsp;</td>
																</cfif>
																<td class="blueMarkerUp"><i class="icon-caret-up icon-3x blue"></i><br />#NumberFormat(genderData.maleCount)#</td>
																<cfif genderData.maleCountTrailingCols gt 0>
																	<td colspan="#genderData.maleCountTrailingCols#">&nbsp;</td>
																</cfif>
															</tr>
														</table>
													</td>
													<td width="100" align="right">
														<!--- tearpanels --->
														<table id="genderPercentages" border="0" cellpadding="0" cellspacing="0">
															<tr class="tearpanel">
																<td valign="top" class="femaleTearpanel">#Int(genderData.femalePercent)#%</td>
																<td valign="bottom" class="maleTearpanel">#Int(genderData.malePercent)#%</td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<hr />
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="49%" height="40" class="statHeader">SENIOR ATTENDANCE</td>
							<td width="2%"></td>
							<td width="49%" height="40" class="statHeader">ATTENDANCE by RACE/ETHNICITY</td>
						</tr>
						<tr valign="middle">
							<td colspan="3">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="49%">
											<table border="0" cellpadding="0" cellspacing="0" width="100%">
												<tr>
													<td><div id="q7DonutChart" class="donutChartContainer"></div></td>
													<td width="100%">
														<!--- legend --->
														<cfset legendCount = 1 />
														<cfset answerData = baseData[7].answers />
														<table border="0" cellpadding="0" cellspacing="0" class="legendTable">
															<cfloop index="a" from="1" to="#StructCount(answerData)#">
																<tr valign="top">
																	<td style="color: #ListGetAt(colors, legendCount)#;"><i class="icon-stop"></i></td>
																	<td align="left" width="100%">
																		<cfif answerData[a]["answer"] eq "yes" or answerData[a]["answer"] eq true>
																			Yes
																		<cfelseif answerData[a]["answer"] eq "no" or answerData[a]["answer"] eq false>
																			No
																		<cfelse>
																			#answerData[a]["answer"]#
																		</cfif>
																	</td>
																</tr>
																<cfset legendCount = legendCount + 1 />
															</cfloop>
														</table>
													</td>
												</tr>
											</table>
										</td>
										<td width="2%">&nbsp;</td>
										<td width="49%">
											<table border="0" cellpadding="0" cellspacing="0" width="100%">
												<tr>
													<td><div id="q12DonutChart" class="donutChartContainer"></div></td>
													<td width="100%">
														<!--- legend --->
														<cfset legendCount = 1 />
														<cfset answerData = baseData[12].answers />
														<table border="0" cellpadding="0" cellspacing="0" class="legendTable">
															<cfloop index="a" from="1" to="#StructCount(answerData)#">
																<tr valign="top">
																	<td style="color: #ListGetAt(colors, legendCount)#;"><i class="icon-stop"></i></td>
																	<td align="left" width="100%">
																		<cfif answerData[a]["answer"] eq "yes" or answerData[a]["answer"] eq true>
																			Yes
																		<cfelseif answerData[a]["answer"] eq "no" or answerData[a]["answer"] eq false>
																			No
																		<cfelse>
																			#answerData[a]["answer"]#
																		</cfif>
																	</td>
																</tr>
																<cfset legendCount = legendCount + 1 />
															</cfloop>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<hr />
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="49%" height="40" class="statHeader">PARENT EDUCATION LEVEL</td>
							<td width="2%"></td>
							<td width="49%" height="40" class="statHeader">ATTENDED with PARENTS</td>
						</tr>
						<tr valign="middle">
							<td colspan="3">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="49%">
											<table border="0" cellpadding="0" cellspacing="0" width="100%">
												<tr>
													<td><div id="q6DonutChart" class="donutChartContainer"></div></td>
													<td width="100%">
														<!--- legend --->
														<cfset legendCount = 1 />
														<cfset answerData = baseData[6].answers />
														<table border="0" cellpadding="0" cellspacing="0" class="legendTable">
															<cfloop index="a" from="1" to="#StructCount(answerData)#">
																<tr valign="top">
																	<td style="color: #ListGetAt(colors, legendCount)#;"><i class="icon-stop"></i></td>
																	<td align="left" width="100%">
																		<cfif answerData[a]["answer"] eq "yes" or answerData[a]["answer"] eq true>
																			Yes
																		<cfelseif answerData[a]["answer"] eq "no" or answerData[a]["answer"] eq false>
																			No
																		<cfelse>
																			#answerData[a]["answer"]#
																		</cfif>
																	</td>
																</tr>
																<cfset legendCount = legendCount + 1 />
															</cfloop>
														</table>
													</td>
												</tr>
											</table>
										</td>
										<td width="2%"></td>
										<td width="49%">
											<table border="0" cellpadding="0" cellspacing="0" width="100%">
												<tr>
													<td><div id="q10DonutChart" class="donutChartContainer"></div></td>
													<td width="100%">
														<!--- legend --->
														<cfset legendCount = 1 />
														<cfset answerData = baseData[10].answers />
														<table border="0" cellpadding="0" cellspacing="0" class="legendTable">
															<cfloop index="a" from="1" to="#StructCount(answerData)#">
																<tr valign="top">
																	<td style="color: #ListGetAt(colors, legendCount)#;"><i class="icon-stop"></i></td>
																	<td align="left" width="100%">
																		<cfif answerData[a]["answer"] eq "yes" or answerData[a]["answer"] eq true>
																			Yes
																		<cfelseif answerData[a]["answer"] eq "no" or answerData[a]["answer"] eq false>
																			No
																		<cfelse>
																			#answerData[a]["answer"]#
																		</cfif>
																	</td>
																</tr>
																<cfset legendCount = legendCount + 1 />
															</cfloop>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					
				<cfelse>
				
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="49%" height="40" class="statHeader">WORKSHOP RATING</td>
							<td width="2%"></td>
							<td width="49%" height="40" class="trendChartLabel">#ListLast(ListFirst(programYears, ","), "-")#-#ListLast(ListLast(programYears, ","), "-")# Trend</td>
						</tr>
						<tr valign="middle">
							<td colspan="3">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="55%">
											<!--- rating --->
											<table id="workshopRating" border="0" cellpadding="0" cellspacing="0" width="100%">
												<tr class="ratingPercentRow">
													<td class="ratingPercent blue" width="25%">#Int(baseData[1].answers[1].percent)#<span class="ratingPercentSymbol">%</span></td>
													<td class="ratingPercent green" width="25%">#Int(baseData[1].answers[2].percent)#<span class="ratingPercentSymbol">%</span></td>
													<td class="ratingPercent blueDark" width="25%">#Int(baseData[1].answers[3].percent)#<span class="ratingPercentSymbol">%</span></td>
													<td class="ratingPercent aqua" width="25%">#Int(baseData[1].answers[4].percent)#<span class="ratingPercentSymbol">%</span></td>
												</tr>
												<tr class="ratingPercentLabelRow">
													<td>Excellent</td>
													<td>Good</td>
													<td>Fair</td>
													<td>Poor</td>
												</tr>
											</table>
										</td>
										<td width="2%">&nbsp;</td>
										<td width="43%"><div id="q1TrendLineChart" class="trendLineChartContainer"></div></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<hr />
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="49%" height="40" class="statHeader">ATTENDANCE by GENDER</td>
							<td width="2%"></td>
							<td width="49%" height="40" class="trendChartLabel">#ListLast(ListFirst(programYears, ","), "-")#-#ListLast(ListLast(programYears, ","), "-")# Trend</td>
						</tr>
						<tr valign="middle">
							<td colspan="3">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="55%">
											<table border="0" cellpadding="0" cellspacing="0" width="100%">
												<tr>
													<td>
														<!--- gingerbread --->
														<table id="genderCounts" border="0" cellpadding="0" cellspacing="0" class="gingerbreadTable">
															<tr class="gingerbreadTopRow">
																<cfif genderData.femaleCountLeadingCols gt 0>
																	<td colspan="#genderData.femaleCountLeadingCols#">&nbsp;</td>
																</cfif>
																<td class="greenMarkerDown">#NumberFormat(genderData.femaleCount)#<br /><i class="icon-caret-down icon-3x green"></i></td>
																<cfif genderData.femaleCountTrailingCols gt 1>
																	<td colspan="#genderData.femaleCountTrailingCols#">&nbsp;</td>
																</cfif>
															</tr>
															<tr class="gingerbreadUpperRow">
																<cfloop index="i" from="1" to="#genderData.femaleOnCount#">
																	<td class="femaleGreen"></td>
																</cfloop>
																<cfloop index="i" from="1" to="#genderData.femaleOffCount#">
																	<td class="femaleDefault"></td>
																</cfloop>
															</tr>
															<tr class="gingerbreadLowerRow">
																<cfloop index="i" from="1" to="#genderData.maleOnCount#">
																	<td class="maleBlue"></td>
																</cfloop>
																<cfloop index="i" from="1" to="#genderData.maleOffCount#">
																	<td class="maleDefault"></td>
																</cfloop>
															</tr>
															<tr class="gingerbreadBottomRow">
																<cfif genderData.maleCountLeadingCols gt 0>
																	<td colspan="#genderData.maleCountLeadingCols#">&nbsp;</td>
																</cfif>
																<td class="blueMarkerUp"><i class="icon-caret-up icon-3x blue"></i><br />#NumberFormat(genderData.maleCount)#</td>
																<cfif genderData.maleCountTrailingCols gt 0>
																	<td colspan="#genderData.maleCountTrailingCols#">&nbsp;</td>
																</cfif>
															</tr>
														</table>
													</td>
													<td width="100" align="center">
														<!--- tearpanels --->
														<table id="genderPercentages" border="0" cellpadding="0" cellspacing="0">
															<tr class="tearpanel">
																<td valign="top" class="femaleTearpanel">#Int(genderData.femalePercent)#%</td>
																<td valign="bottom" class="maleTearpanel">#Int(genderData.malePercent)#%</td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</td>
										<td width="2%">&nbsp;</td>
										<td width="43%"><div id="q11TrendLineChart" class="trendLineChartContainer"></div></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<hr />
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="49%" height="40" class="statHeader">SENIOR ATTENDANCE</td>
							<td width="2%"></td>
							<td width="49%" height="40" class="trendChartLabel">#ListLast(ListFirst(programYears, ","), "-")#-#ListLast(ListLast(programYears, ","), "-")# Trend</td>
						</tr>
						<tr valign="middle">
							<td colspan="3">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="27%"><div id="q7DonutChart" class="donutChartContainer"></div></td>
										<td width="30%" align="center">
											<!--- legend --->
											<cfset legendCount = 1 />
											<cfset answerData = baseData[7].answers />
											<table border="0" cellpadding="0" cellspacing="0" class="legendTable" width="80%">
												<cfloop index="a" from="1" to="#StructCount(answerData)#">
													<tr valign="top">
														<td style="color: #ListGetAt(colors, legendCount)#;"><i class="icon-stop"></i></td>
														<td align="left" width="100%">
															<cfif answerData[a]["answer"] eq "yes" or answerData[a]["answer"] eq true>
																Yes
															<cfelseif answerData[a]["answer"] eq "no" or answerData[a]["answer"] eq false>
																No
															<cfelse>
																#answerData[a]["answer"]#
															</cfif>
														</td>
													</tr>
													<cfset legendCount = legendCount + 1 />
												</cfloop>
											</table>
										</td>
										<td width="43%"><div id="q7TrendAreaChart" class="trendAreaChartContainer"></div></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<hr />
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="49%" height="40" class="statHeader">ATTENDANCE by RACE/ETHNICITY</td>
							<td width="2%"></td>
							<td width="49%" height="40" class="trendChartLabel">#ListLast(ListFirst(programYears, ","), "-")#-#ListLast(ListLast(programYears, ","), "-")# Trend</td>
						</tr>
						<tr valign="middle">
							<td colspan="3">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="27%"><div id="q12DonutChart" class="donutChartContainer"></div></td>
										<td width="30%" align="center">
											<!--- legend --->
											<cfset legendCount = 1 />
											<cfset answerData = baseData[12].answers />
											<table border="0" cellpadding="0" cellspacing="0" class="legendTable" width="80%">
												<cfloop index="a" from="1" to="#StructCount(answerData)#">
													<tr valign="top">
														<td style="color: #ListGetAt(colors, legendCount)#;"><i class="icon-stop"></i></td>
														<td align="left" width="100%">
															<cfif answerData[a]["answer"] eq "yes" or answerData[a]["answer"] eq true>
																Yes
															<cfelseif answerData[a]["answer"] eq "no" or answerData[a]["answer"] eq false>
																No
															<cfelse>
																#answerData[a]["answer"]#
															</cfif>
														</td>
													</tr>
													<cfset legendCount = legendCount + 1 />
												</cfloop>
											</table>
										</td>
										<td width="43%"><div id="q12TrendLineChart" class="trendLineChartContainer"></div></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<hr />
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="49%" height="40" class="statHeader">PARENT EDUCATION LEVEL</td>
							<td width="2%"></td>
							<td width="49%" height="40" class="trendChartLabel">#ListLast(ListFirst(programYears, ","), "-")#-#ListLast(ListLast(programYears, ","), "-")# Trend</td>
						</tr>
						<tr valign="middle">
							<td colspan="3">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="27%"><div id="q6DonutChart" class="donutChartContainer"></div></td>
										<td width="30%" align="center">
											<!--- legend --->
											<cfset legendCount = 1 />
											<cfset answerData = baseData[6].answers />
											<table border="0" cellpadding="0" cellspacing="0" class="legendTable" width="80%">
												<cfloop index="a" from="1" to="#StructCount(answerData)#">
													<tr valign="top">
														<td style="color: #ListGetAt(colors, legendCount)#;"><i class="icon-stop"></i></td>
														<td align="left" width="100%">
															<cfif answerData[a]["answer"] eq "yes" or answerData[a]["answer"] eq true>
																Yes
															<cfelseif answerData[a]["answer"] eq "no" or answerData[a]["answer"] eq false>
																No
															<cfelse>
																#answerData[a]["answer"]#
															</cfif>
														</td>
													</tr>
													<cfset legendCount = legendCount + 1 />
												</cfloop>
											</table>
										</td>
										<td width="43%"><div id="q6TrendLineChart" class="trendLineChartContainer"></div></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<hr />
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="49%" height="40" class="statHeader">ATTENDED with PARENTS</td>
							<td width="2%"></td>
							<td width="49%" height="40" class="trendChartLabel">#ListLast(ListFirst(programYears, ","), "-")#-#ListLast(ListLast(programYears, ","), "-")# Trend</td>
						</tr>
						<tr valign="middle">
							<td colspan="3">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="27%"><div id="q10DonutChart" class="donutChartContainer"></div></td>
										<td width="30%" align="center">
											<!--- legend --->
											<cfset legendCount = 1 />
											<cfset answerData = baseData[10].answers />
											<table border="0" cellpadding="0" cellspacing="0" class="legendTable" width="80%">
												<cfloop index="a" from="1" to="#StructCount(answerData)#">
													<tr valign="top">
														<td style="color: #ListGetAt(colors, legendCount)#;"><i class="icon-stop"></i></td>
														<td align="left" width="100%">
															<cfif answerData[a]["answer"] eq "yes" or answerData[a]["answer"] eq true>
																Yes
															<cfelseif answerData[a]["answer"] eq "no" or answerData[a]["answer"] eq false>
																No
															<cfelse>
																#answerData[a]["answer"]#
															</cfif>
														</td>
													</tr>
													<cfset legendCount = legendCount + 1 />
												</cfloop>
											</table>
										</td>
										<td width="43%"><div id="q10TrendLineChart" class="trendAreaLineContainer"></div></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				
				</cfif>

			</td>
		</tr>
	</table>
</cfoutput>
</cfdocument>

</body>
</html>

<!--- <table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr valign="top">
						<td width="49%">
							<div class="statHeader">WORKSHOP RATING</div>
							<!--- <p>The fluid grid system uses percents instead of pixels for column widths. It has the same responsive capabilities as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.</p> --->
							<!--- <table id="workshopRating" border="0" cellpadding="0" cellspacing="0" style="width: 90%; margin-top: 40px;">
								<tr class="ratingPercentRow">
									<td class="ratingPercent blueDark" width="25%">#Int(baseData[1].answers[1].percent)#%</td>
									<td class="ratingPercent greenDark" width="25%">#Int(baseData[1].answers[2].percent)#%</td>
									<td class="ratingPercent aqua" width="25%">#Int(baseData[1].answers[3].percent)#%</td>
									<td class="ratingPercent green" width="25%">#Int(baseData[1].answers[4].percent)#%</td>
								</tr>
								<tr class="ratingPercentLabelRow">
									<td>Excellent</td>
									<td>Good</td>
									<td>Fair</td>
									<td>Poor</td>
								</tr>
							</table> --->
							<table id="workshopRating" border="0" cellpadding="0" cellspacing="2" style="width: 90%; margin-top: 40px;">
								<tr class="ratingPercentRow">
									<td class="ratingPercent blueDark" width="25%">#Int(baseData[1].answers[1].percent)#%</td>
									<td class="ratingPercent greenDark" width="25%">#Int(baseData[1].answers[2].percent)#%</td>
									<td class="ratingPercent aqua" width="25%">#Int(baseData[1].answers[3].percent)#%</td>
									<td class="ratingPercent green" width="25%">#Int(baseData[1].answers[4].percent)#%</td>
								</tr>
								<tr class="ratingPercentLabelRow">
									<td>Excellent</td>
									<td>Good</td>
									<td>Fair</td>
									<td>Poor</td>
								</tr>
							</table>
						</td>
						<td width="2%"></td>
						<td width="49%">
							<div class="statHeader">WORKSHOP RATING TREND</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="50%">
										<div id="q1TrendLineChart" class="trendLineChartContainer"></div>
									</td>
									<td width="50%">
										<cfset legendCount = 1 />
										<cfset answerData = baseData[1].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<tr valign="top">
													<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
													<td>#answerData[a]["answer"]#</td>
												</tr>
												<cfset legendCount = legendCount + 1 />
											</cfloop>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<hr />
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr valign="top">
						<td width="49%">
							<div class="statHeader">ATTENDANCE by GENDER</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td>
										<table id="genderCounts" border="0" cellpadding="0" cellspacing="0">
											<tr class="gingerbreadTopRow">
												<cfif genderData.femaleCountLeadingCols gt 0>
													<td colspan="#genderData.femaleCountLeadingCols#">&nbsp;</td>
												</cfif>
												<td class="greenMarkerDown">#genderData.femaleCount#</td>
												<cfif genderData.femaleCountTrailingCols gt 1>
													<td colspan="#genderData.femaleCountTrailingCols#">&nbsp;</td>
												</cfif>
												<td rowspan="4" align="center" valign="middle" class="teardropXSmall defaultTeardropNWXSmall">#genderData.totalCount#</td>
											</tr>
											<tr class="gingerbreadUpperRow">
												<cfloop index="i" from="1" to="#genderData.femaleOnCount#">
													<td class="femaleGreen"></td>
												</cfloop>
												<cfloop index="i" from="1" to="#genderData.femaleOffCount#">
													<td class="femaleDefault"></td>
												</cfloop>
											</tr>
											<tr class="gingerbreadLowerRow">
												<cfloop index="i" from="1" to="#genderData.maleOnCount#">
													<td class="maleBlue"></td>
												</cfloop>
												<cfloop index="i" from="1" to="#genderData.maleOffCount#">
													<td class="maleDefault"></td>
												</cfloop>
											</tr>
											<tr class="gingerbreadBottomRow">
												<cfif genderData.maleCountLeadingCols gt 0>
													<td colspan="#genderData.maleCountLeadingCols#">&nbsp;</td>
												</cfif>
												<td class="blueMarkerUp">#genderData.maleCount#</td>
												<cfif genderData.maleCountTrailingCols gt 0>
													<td colspan="#genderData.maleCountTrailingCols#">&nbsp;</td>
												</cfif>
											</tr>
										</table>
									</td>
									<td align="center" valign="middle" width="140">
										<table id="genderPercentages" border="0" cellpadding="0" cellspacing="0" width="66" height="120">
											<tr>
												<td valign="top" class="femaleTearpanel">#Int(genderData.femalePercent)#%</td>
												<td valign="bottom" class="maleTearpanel">#Int(genderData.malePercent)#%</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
						<td width="2%"></td>
						<td width="49%">
							<div class="statHeader">ATTENDANCE by GENDER TREND</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="50%">
										<div id="q11TrendLineChart" class="trendLineChartContainer"></div>
									</td>
									<td width="50%">
										<cfset legendCount = 1 />
										<cfset answerData = baseData[11].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<tr valign="top">
													<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
													<td>
														<cfif answerData[a]["answer"] eq "yes">
															Yes
														<cfelseif answerData[a]["answer"] eq "no">
															No
														<cfelse>
															#answerData[a]["answer"]#
														</cfif>
													</td>
												</tr>
												<cfset legendCount = legendCount + 1 />
											</cfloop>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<hr />
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr valign="top">
						<td width="49%">
							<div class="statHeader">SENIOR ATTENDANCE</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="50%">
										<div id="q7DonutChart" class="donutChartContainer"></div>
									</td>
									<td width="50%">
										<cfset legendCount = 1 />
										<cfset answerData = baseData[7].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<cfif answerData[a]["count"] gt 0>
													<tr valign="top">
														<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
														<td>
															<cfif answerData[a]["answer"] eq "yes">
																Senior
															<cfelseif answerData[a]["answer"] eq "no">
																Non-Senior
															<cfelse>
																#answerData[a]["answer"]#
															</cfif>
														</td>
													</tr>
													<cfset legendCount = legendCount + 1 />
												</cfif>
											</cfloop>
										</table>
									</td>
								</tr>
							</table>
						</td>
						<td width="2%"></td>
						<td width="49%">
							<div class="statHeader">SENIOR ATTENDANCE TREND</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="50%">
										<div id="q7TrendLineChart" class="trendLineChartContainer"></div>
									</td>
									<td width="50%">
										<cfset legendCount = 1 />
										<cfset answerData = baseData[7].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<tr valign="top">
													<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
													<td>#answerData[a]["answer"]#</td>
												</tr>
												<cfset legendCount = legendCount + 1 />
											</cfloop>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<hr />
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr valign="top">
						<td width="49%">
							<div class="statHeader">ATTENDANCE by RACE/ETHNICITY</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="50%">
										<div id="q12DonutChart" class="donutChartContainer"></div>
									</td>
									<td width="50%">
										<cfset legendCount = 1 />
										<cfset answerData = baseData[12].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<cfif answerData[a]["count"] gt 0>
													<tr valign="top">
														<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
														<td>#answerData[a]["answer"]#</td>
													</tr>
													<cfset legendCount = legendCount + 1 />
												</cfif>
											</cfloop>
										</table>
									</td>
								</tr>
							</table>
						</td>
						<td width="2%"></td>
						<td width="49%">
							<div class="statHeader">ATTENDANCE by RACE/ETHNICITY TREND</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="50%">
										<div id="q12TrendLineChart" class="trendLineChartContainer"></div>
									</td>
									<td width="50%">
										<cfset legendCount = 1 />
										<cfset answerData = baseData[12].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<tr valign="top">
													<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
													<td>
														#answerData[a]["answer"]#
													</td>
												</tr>
												<cfset legendCount = legendCount + 1 />
											</cfloop>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<hr />
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr valign="top">
						<td width="49%">
							<div class="statHeader">PARENT EDUCATION LEVEL</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="50%">
										<div id="q6DonutChart" class="donutChartContainer"></div>
									</td>
									<td width="50%">
										<cfset legendCount = 1 />
										<cfset answerData = baseData[6].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<cfif answerData[a]["count"] gt 0>
													<tr valign="top">
														<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
														<td>#answerData[a]["answer"]#</td>
													</tr>
													<cfset legendCount = legendCount + 1 />
												</cfif>
											</cfloop>
										</table>
									</td>
								</tr>
							</table>
						</td>
						<td width="2%"></td>
						<td width="49%">
							<div class="statHeader">PARENT EDUCATION LEVEL TREND</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td width="50%">
										<div id="q6TrendLineChart" class="trendLineChartContainer"></div>
									</td>
									<td width="50%">
										<cfset legendCount = 1 />
										<cfset answerData = baseData[6].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<tr valign="top">
													<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
													<td>#answerData[a]["answer"]#</td>
												</tr>
												<cfset legendCount = legendCount + 1 />
											</cfloop>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<hr /> --->
<!--- <table border="1" cellpadding="0" cellspacing="0" width="100%">
					<tr valign="top">
						<td width="200">
							<div class="statHeader">ATTENDED with PARENT</div>
							<div id="q10DonutChart" class="baseChartContainer"></div>
						</td>
						<td width="30"></td>
						<td width="180">
							<cfset legendCount = 1 />
							<cfset answerData = baseData[10].answers />
							<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
								<cfloop index="a" from="1" to="#StructCount(answerData)#">
									<tr valign="top">
										<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
										<td>
											<cfif answerData[a]["answer"] eq "yes">
												Yes
											<cfelseif answerData[a]["answer"] eq "no">
												No
											<cfelse>
												#answerData[a]["answer"]#
											</cfif>
										</td>
									</tr>
									<cfset legendCount = legendCount + 1 />
								</cfloop>
							</table>
						</td>
						<td width="30"></td>
						<td width="300">
							<div class="statHeader">ATTENDED with PARENT TREND</div>
							<div id="q10TrendLineChart" class="trendChartContainer"></div>
						</td>
					</tr>
				</table> --->
<!--- <table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr valign="top">
						<td width="49%">
							<div class="statHeader">ATTENDED with PARENT</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr valign="middle">
									<td width="50%">
										<div id="q10DonutChart" class="donutChartContainer"></div>
									</td>
									<td width="50%">
										<!--- <cfset legendCount = 1 />
										<cfset answerData = baseData[10].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<cfif answerData[a]["count"] gt 0>
													<tr valign="top">
														<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
														<td>
															<cfif answerData[a]["answer"] eq "yes">
																Yes
															<cfelseif answerData[a]["answer"] eq "no">
																No
															<cfelse>
																#answerData[a]["answer"]#
															</cfif>
														</td>
													</tr>
													<cfset legendCount = legendCount + 1 />
												</cfif>
											</cfloop>
										</table> --->
										<cfset legendCount = 1 />
										<cfset answerData = baseData[10].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<tr valign="top">
													<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
													<td>
														<cfif answerData[a]["answer"] eq "yes">
															Yes
														<cfelseif answerData[a]["answer"] eq "no">
															No
														<cfelse>
															#answerData[a]["answer"]#
														</cfif>
													</td>
												</tr>
												<cfset legendCount = legendCount + 1 />
											</cfloop>
										</table>
									</td>
								</tr>
							</table>
						</td>
						<td width="2%"></td>
						<td width="49%">
							<div class="statHeader">ATTENDED with PARENT TREND</div>
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td>
										<div id="q10TrendLineChart" class="trendLineChartContainer"></div>
									</td>
									<!--- <td width="50%">
										<cfset legendCount = 1 />
										<cfset answerData = baseData[10].answers />
										<table border="0" cellpadding="4" cellspacing="2" class="legendTable">
											<cfloop index="a" from="1" to="#StructCount(answerData)#">
												<tr valign="top">
													<td style="color: #ListGetAt(colors, legendCount)#; font-size: 24px;"><i class="icon-stop"></i></td>
													<td>
														<cfif answerData[a]["answer"] eq "yes">
															Yes
														<cfelseif answerData[a]["answer"] eq "no">
															No
														<cfelse>
															#answerData[a]["answer"]#
														</cfif>
													</td>
												</tr>
												<cfset legendCount = legendCount + 1 />
											</cfloop>
										</table>
									</td> --->
								</tr>
							</table>
						</td>
					</tr>
				</table> --->
<!--- </table> --->
<!--- <img src="/assets/calgrants/ui/images/hdwd/female-green.png" />
<img src="/assets/calgrants/ui/images/hdwd/female-green.png" />
<img src="/assets/calgrants/ui/images/hdwd/female-green.png" />
<img src="/assets/calgrants/ui/images/hdwd/female-green.png" />
<img src="/assets/calgrants/ui/images/hdwd/female-green.png" />
<img src="/assets/calgrants/ui/images/hdwd/female-default.png" />
<img src="/assets/calgrants/ui/images/hdwd/female-default.png" />
<img src="/assets/calgrants/ui/images/hdwd/female-default.png" />
<img src="/assets/calgrants/ui/images/hdwd/female-default.png" />
<img src="/assets/calgrants/ui/images/hdwd/female-default.png" /> --->
<!--- <span class="icon-female highlighted"></span>
<span class="icon-female highlighted"></span>
<span class="icon-female highlighted"></span>
<span class="icon-female highlighted"></span>
<span class="icon-female highlighted"></span>
<span class="icon-female"></span>
<span class="icon-female"></span>
<span class="icon-female"></span>
<span class="icon-female"></span>
<span class="icon-female"></span> --->
<!--- <div class="span1"><span class="icon-female highlighted"></span></div>
<div class="span1"><span class="icon-female highlighted"></span></div>
<div class="span1"><span class="icon-female highlighted"></span></div>
<div class="span1"><span class="icon-female"></span></div>
<div class="span1"><span class="icon-female"></span></div>
<div class="span1"><span class="icon-female"></span></div>
<div class="span1"><span class="icon-female"></span></div>
<div class="span2"></div> --->
<!--- <img src="/assets/calgrants/ui/images/hdwd/male-blue.png" />
<img src="/assets/calgrants/ui/images/hdwd/male-blue.png" />
<img src="/assets/calgrants/ui/images/hdwd/male-blue.png" />
<img src="/assets/calgrants/ui/images/hdwd/male-blue.png" />
<img src="/assets/calgrants/ui/images/hdwd/male-blue.png" />
<img src="/assets/calgrants/ui/images/hdwd/male-default.png" />
<img src="/assets/calgrants/ui/images/hdwd/male-default.png" />
<img src="/assets/calgrants/ui/images/hdwd/male-default.png" />
<img src="/assets/calgrants/ui/images/hdwd/male-default.png" />
<img src="/assets/calgrants/ui/images/hdwd/male-default.png" /> --->

<!--- <div class="span1"><span class="icon-male highlighted"></span></div>
<div class="span1"><span class="icon-male highlighted"></span></div>
<div class="span1"><span class="icon-male highlighted"></span></div>
<div class="span1"><span class="icon-male highlighted"></span></div>
<div class="span1"><span class="icon-male highlighted"></span></div>
<div class="span1"><span class="icon-male"></span></div>
<div class="span1"><span class="icon-male"></span></div>
<div class="span1"><span class="icon-male"></span></div>
<div class="span1"><span class="icon-male"></span></div>
<div class="span1"><span class="icon-male"></span></div>
<div class="span2"></div> --->
<!--- <span class="icon-male highlighted"></span>
<span class="icon-male highlighted"></span>
<span class="icon-male highlighted"></span>
<span class="icon-male highlighted"></span>
<span class="icon-male highlighted"></span>
<span class="icon-male"></span>
<span class="icon-male"></span>
<span class="icon-male"></span>
<span class="icon-male"></span>
<span class="icon-male"></span> --->
<!--- <cfdump var="#workshopEvaluations#"> --->
<!--- <cfdump var="#baseData#" expand="no" label="baseData">
<cfdump var="#trendWorkshops#" expand="no" label="Site Workshops"> --->
<!--- <cfquery name="getProgramYears" dbtype="query">
	select Program_Year, count(Workshop_ID) as Workshop_Count from trendWorkshops group by Program_Year order by Program_Year desc
</cfquery> --->
<!--- <cfdump var="#getProgramYears#"> --->
<!--- <cfoutput>
	<cfloop query="getProgramYears">
		<cfif Program_Year neq qWorkshop.Program_Year>
			<!--- <cfset baseData = evaluationGateway.report(programYear = Program_Year, siteIDs = qWorkshop.Site_ID)> --->
			<h3>#Program_Year# - #Workshop_Count#</h3>
			<!--- <cfdump var="#baseData#" expand="no" label="#Program_Year#"> --->
		</cfif>
	</cfloop>
</cfoutput> --->
<!--- <cfdump var="#baseData#" expand="no"> --->
<!--- <cfoutput>
<h3>How Did We Do?</h3>

<h4>Workshop Ratings</h4>
<cfloop index="r" from="1" to="#ArrayLen(baseData[1].answers)#">
	<cfset fs = Int(baseData[1].answers[r].response_percent) * 2 />
	<cfif fs gt 0>
	<font style="font-size: #fs#px;"><span class="icon-circle"></span></font>&nbsp;
	<cfelse>
		<font style="font-size: 4px;"><span class="icon-circle"></span></font>&nbsp;
	</cfif>
</cfloop> --->

<!--- <font style="font-size: 128px"><span class="icon-circle"></span></font>&nbsp;
<font style="font-size: 12px"><span class="icon-circle"></span></font>&nbsp;
<font style="font-size: 4px"><span class="icon-circle"></span></font> --->
<!--- <cfdump var="#baseData[1].answers#" expand="no" /> --->

<!--- <h4>Attendance by Gender</h4>
<cfdump var="#baseData[11].answers#" expand="no" />

<h4>Senior Attendance</h4>
<cfdump var="#baseData[7].answers#" expand="no" />

<h4>Attendance by Race/Ethnicity</h4>
<cfdump var="#baseData[12].answers#" expand="no" />

<h4>Parent Education Level</h4>
<cfdump var="#baseData[6].answers#" expand="no" />

<h4>Attended with Parents</h4>
<cfdump var="#baseData[10].answers#" expand="no" /> --->

<!--- <h4>FAFSA/Dream Act Applications</h4>
<cfdump var="#baseData[15].answers#" expand="no" /> --->

<!--- <h4>Cal Grant Applications</h4>
<cfdump var="#baseData[1].answers#" expand="no" />
</cfoutput> --->

<!--- <cfparam name="resetFilters" default="false">
<cfset isFiltered = false />
<cfset queryParams = StructNew() />

<cfif NOT IsDefined("client.howDidWeDo.programYear") or resetFilters>
<cfset client.howDidWeDo.programYear = request.currentProgramYear>
<cfelseif IsDefined("filterProgramYear")>
<cfset client.howDidWeDo.programYear = filterProgramYear>
</cfif>
<cfif client.howDidWeDo.programYear neq request.currentProgramYear>
<cfset isFiltered = true />
<cfset queryParams.programYear = client.howDidWeDo.programYear />
<cfelse>
<cfset queryParams.programYear = request.currentProgramYear />
</cfif>

<!--- <cfif NOT IsDefined("client.howDidWeDo.workshopIDs") or resetFilters>
<cfset client.howDidWeDo.workshopIDs = "All">
<cfelseif IsDefined("filterWorkshopIDs")>
<cfset client.howDidWeDo.workshopIDs = filterWorkshopIDs>
</cfif>
<cfif client.howDidWeDo.workshopIDs neq "All">
<cfset isFiltered = true />
<cfset queryParams.workshopIDs = client.howDidWeDo.workshopIDs />
</cfif> --->

<cfif NOT IsDefined("client.howDidWeDo.countyIDs") or resetFilters>
<cfset client.howDidWeDo.countyIDs = "All">
<cfelseif IsDefined("filterCountyIDs")>
<cfset client.howDidWeDo.countyIDs = filterCountyIDs>
</cfif>
<cfif client.howDidWeDo.countyIDs neq "All">
<cfset isFiltered = true />
<cfset queryParams.countyIDs = client.howDidWeDo.countyIDs />
<cfset filterCountyIDs = "All" />
</cfif>

<cfif NOT IsDefined("client.howDidWeDo.zipCodeIDs") or resetFilters>
<cfset client.howDidWeDo.zipCodeIDs = "All">
<cfelseif IsDefined("filterZipCodeIDs")>
<cfset client.howDidWeDo.zipCodeIDs = filterZipCodeIDs>
</cfif>
<cfif client.howDidWeDo.zipCodeIDs neq "All">
<cfset isFiltered = true />
<cfset queryParams.zipCodeIDs = client.howDidWeDo.zipCodeIDs />
<cfset filterZipCodeIDs = "All" />
</cfif>

<cfif NOT IsDefined("client.howDidWeDo.cityIDs") or resetFilters>
<cfset client.howDidWeDo.cityIDs = "All">
<cfelseif IsDefined("filterCityIDs")>
<cfset client.howDidWeDo.cityIDs = filterCityIDs>
</cfif>
<cfif client.howDidWeDo.cityIDs neq "All">
<cfset isFiltered = true />
<cfset queryParams.cityIDs = client.howDidWeDo.cityIDs />
<cfset filterCityIDs = "All" />
</cfif>

<cfif NOT IsDefined("client.howDidWeDo.districtIDs") or resetFilters>
<cfset client.howDidWeDo.districtIDs = "All">
<cfelseif IsDefined("filterDistrictIDs")>
<cfset client.howDidWeDo.districtIDs = filterDistrictIDs>
</cfif>
<cfif client.howDidWeDo.districtIDs neq "All">
<cfset isFiltered = true />
<cfset queryParams.districtIDs = client.howDidWeDo.districtIDs />
<cfset filterDistrictIDs = "All" />
</cfif>

<cfif NOT IsDefined("client.howDidWeDo.schoolIDs") or resetFilters>
<cfset client.howDidWeDo.schoolIDs = "All">
<cfelseif IsDefined("filterSchoolIDs")>
<cfset client.howDidWeDo.schoolIDs = filterSchoolIDs>
</cfif>
<cfif client.howDidWeDo.schoolIDs neq "All">
<cfset isFiltered = true />
<cfset queryParams.schoolIDs = client.howDidWeDo.schoolIDs />
<cfset filterSchoolIDs = "All" />
</cfif>

<cfif IsUserInRole("Super User")>
<cfif NOT IsDefined("client.howDidWeDo.regionIDs") or resetFilters>
<cfset client.howDidWeDo.regionIDs = "All">
<cfelseif IsDefined("filterRegionIDs")>
<cfset client.howDidWeDo.regionIDs = filterRegionIDs>
</cfif>
<cfelseif IsUserInRole("Regional Admin")>
<cfset client.howDidWeDo.regionIDs = request.authUser.regionID>
</cfif>
<cfif client.howDidWeDo.regionIDs neq "All">
<cfset isFiltered = true />
<cfset queryParams.regionIDs = client.howDidWeDo.regionIDs />
</cfif>

<cfif NOT IsDefined("client.howDidWeDo.organizationIDs") or resetFilters>
<cfset client.howDidWeDo.organizationIDs = "All">
<cfelseif IsDefined("filterOrganizationIDs")>
<cfset client.howDidWeDo.organizationIDs = filterOrganizationIDs>
</cfif>
<cfif client.howDidWeDo.organizationIDs neq "All">
<cfset isFiltered = true />
<cfset queryParams.organizationIDs = client.howDidWeDo.organizationIDs />
<cfset filterRegionIDs = "All" />
</cfif>

<cfwddx action="cfml2wddx" input="#queryParams#" output="client.howDidWeDo.queryParamsWDDX" /> --->

<!--- <cfscript>
//workshopGateway = new assets.calgrants.com.gateway.WorkshopGateway();
//workshops = workshopGateway.query(Program_Year = queryParams.programYear, Approved = 1, regionIDs = IIf(IsUserInRole("Regional Admin"), request.authUser.regionID, queryParams.regionIDs));
organizationGateway = new assets.calgrants.com.gateway.OrganizationGateway();
organizations = organizationGateway.query(regionIDs = IIf(IsUserInRole("Regional Admin"), request.authUser.regionID, ""), Organization_ID = IIf(IsUserInRole("Organizer") OR IsUserInRole("Site Contact"), request.authUser.organizationID, ""));
storedProcedureGateway = new assets.calgrants.com.gateway.StoredProcedureGateway();
regions = storedProcedureGateway.call("getDistinctRegions");
countyGateway = new assets.calgrants.com.gateway.CountyGateway();
counties = countyGateway.query();
evaluationGateway = new assets.calgrants.com.gateway.EvaluationGateway();
baseData = evaluationGateway.report(argumentCollection = queryParams);
if (ArrayLen(baseData) gt 0) {
evaluationCount = baseData[1].Response_Count + baseData[1].No_Response_Count;
} else {
evaluationCount = 0;
}
</cfscript>

<h3>How Did We Do<cfif isFiltered> <small><em>filtered</em></small></cfif></h3>

<cfif ArrayLen(baseData) gt 0>

<script type="text/javascript">

var parseQuestions = function(questions) {
	for (var q = 0; q < questions.length; q++) {
		questions[q].QUESTION_NUMBER = parseInt(questions[q].QUESTION_NUMBER);
		questions[q].RESPONSE_COUNT = parseInt(questions[q].RESPONSE_COUNT);
		questions[q].MULTI_RESPONSE_COUNT = parseInt(questions[q].MULTI_RESPONSE_COUNT);
		questions[q].NO_RESPONSE_COUNT = parseInt(questions[q].NO_RESPONSE_COUNT);
	}
	return questions;
}

var parseAnswers = function(answers) {
	for (var a = 0; a < answers.length; a++) {
		if (answers[a].ANSWER === true) {
			answers[a].ANSWER = "Yes ";
		} else if (answers[a].ANSWER === false) {
			answers[a].ANSWER = "No ";
		}
		answers[a].ANSWER_NUMBER = parseInt(answers[a].ANSWER_NUMBER);
		answers[a].RESPONSE_COUNT = parseInt(answers[a].RESPONSE_COUNT);
		answers[a].RESPONSE_PERCENT = parseFloat(answers[a].RESPONSE_PERCENT);
		//answers[a].RESPONSE_OTHER = answers[a].ANSWER_VALUES.toString();
		answers[a].EXPLODE = false;
	}
	return answers;
}

<cfoutput>
	var questions = #SerializeJSON(baseData)#;
</cfoutput>

var pieLabelTemplate = "#= dataItem.ANSWER# - #= dataItem.RESPONSE_PERCENT#%";
var pieLegendTemplate = "#= dataItem.ANSWER# - #= dataItem.RESPONSE_PERCENT#%";
//var pieTooltipTemplate = "#= dataItem.ANSWER# - #= dataItem.RESPONSE_COUNT#";
var pieTooltipTemplate = "#= dataItem.RESPONSE_COUNT# responses = #= dataItem.RESPONSE_PERCENT#%";
var barLabelTemplate = "#= dataItem.ANSWER# - #= dataItem.RESPONSE_PERCENT#%";
var barLegendTemplate = "#= text#";
var barTooltipTemplate = "#= dataItem.RESPONSE_COUNT# responses = #= dataItem.RESPONSE_PERCENT#%";
var labelFont = "12px Arial,Helvetical,sans-serif";
var legendFont = "12px Arial,Helvetical,sans-serif";
var tooltipFont = "12px Arial,Helvetical,sans-serif";

renderPieChart = function(q) {
	var question = questions[q-1];
	var answers = parseAnswers(question.ANSWERS);
	$("#q" + q + "Chart").kendoChart({
		theme: $(document).data("kendoSkin") || "blueopal",
		dataSource: answers,
		series: [{
			type: "pie",
			field: "RESPONSE_PERCENT",
			categoryField: "ANSWER",
			explodeField: "EXPLODE",
			labels: {
				visible: false,
				align: "circle",
				font: labelFont,
				template: pieLabelTemplate,
				distance: 0
			},
			padding: 0
		}],
		legend: {
			visible: false,
			position: "left",
			labels: {
				font: legendFont,
				template: pieLegendTemplate
			}
		},
		tooltip: {
			visible: true,
			font: tooltipFont,
			template: pieTooltipTemplate
		}
	})
}

renderBarChart = function(q) {
	var question = questions[q-1];
	var answers = parseAnswers(question.ANSWERS);
	$("#q" + q + "Chart").kendoChart({
		theme: $(document).data("kendoSkin") || "metro",
		dataSource: answers,
		plotArea: {
			margin: {
				right: 200
			}
		},
		series: [{
			type: "bar",
			field: "RESPONSE_PERCENT",
			categoryField: "ANSWER",
			labels: {visible: true, font: labelFont, template: barLabelTemplate, position: "outsideEnd"},
			missingValue: "zero",
			gap: 0.4,
			spacing: 0.2,
			markers: {visible: true, border: {width: 2, size: 6}},
			padding: 50
		}],
		valueAxis: {
			title: {visible: false, text: "valueAxis"},
			labels: {template: "#= value#%"},
			majorGridLines: {visible: true, color: "gray"},
			majorTicks: {visible: true, color: "gray"},
			minorGridLines: {visible: false, color: "silver"},
			minorTicks: {visible: false, color: "silver"},
			plotBands: [{
				from: 49,
				to: 51,
				color: "gray",
				opacity: 0.3
			}]
		},
		categoryAxis: {
			title: {visible: false, text: "categoryAxis"},
			majorGridLines: {visible: false},
			majorTicks: {visible: false}
		},
		legend: {
			visible: false,
			position: "left",
			labels: {font: legendFont, template: barLegendTemplate}
		},
		tooltip: {
			visible: true,
			font: tooltipFont,
			template: barTooltipTemplate
		}
	})
}

initialize = function() {
	// Using spreadsheet as underlying table.  Change to Fusion Tables.
	var query = new google.visualization.Query('https://spreadsheets.google.com/pub?key=pCQbetd-CptF0r8qmCOlZGg');
	query.send(draw);
}

/*draw = function(response) {
	if (response.isError()) {
		alert('Error in query');
	}
	
	var ticketsData = response.getDataTable();
	var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
	chart.draw(ticketsData, {'isStacked': true, 'legend': 'bottom',	'vAxis': {'title': 'Number of tickets'}});

	var geoData = new google.visualization.DataTable();
	geoData.addColumn('string', 'City');
	geoData.addColumn('string', 'Name');
	geoData.addColumn('boolean', 'Food');
	geoData.addRows(3);
	geoData.setCell(0, 0, 'London');
	geoData.setCell(1, 0, 'Paris');
	geoData.setCell(2, 0, 'Moscow');
	geoData.setCell(0, 1, 'Cinematics London');
	geoData.setCell(1, 1, 'Cinematics Paris');
	geoData.setCell(2, 1, 'Cinematics Moscow');
	geoData.setCell(0, 2, true);
	geoData.setCell(1, 2, true);
	geoData.setCell(2, 2, false);

	var geoView = new google.visualization.DataView(geoData);
	geoView.setColumns([0, 1]);
	
	var table = new google.visualization.Table(document.getElementById('table_div'));
	table.draw(geoData, {showRowNumber: false});
	
	var map = new google.visualization.Map(document.getElementById('map_div'));
	map.draw(geoView, {showTip: true});

	// Set a 'select' event listener for the table.
	// When the table is selected,
	// we set the selection on the map.
	google.visualization.events.addListener(table, 'select',
		function() {
			map.setSelection(table.getSelection());
		}
	);
	
	// Set a 'select' event listener for the map.
	// When the map is selected,
	// we set the selection on the table.
	google.visualization.events.addListener(map, 'select',
		function() {
			table.setSelection(map.getSelection());
		}
	);
};

google.load('visualization', '1', {'packages': ['table', 'map', 'corechart']});
	
google.setOnLoadCallback(initialize);*/

$(function() {
	var pieCharts = "1,2,3,4,5,7,10,11,12,13,15,17,19";
	var barCharts = "6,9,14,16,18";
	var pieChartsArray = pieCharts.split(",");
	var barChartsArray = barCharts.split(",");
	if (pieChartsArray.length > 0) {
		for (var q = 0; q < pieChartsArray.length; q++) {
			renderPieChart(pieChartsArray[q]);
		}
	}
	if (barChartsArray.length > 0) {
		for (var q = 0; q < barChartsArray.length; q++) {
			renderBarChart(barChartsArray[q]);
		}
	}
});
//-->
</script>

<style type="text/css">
.k-chart {
	width: 200px;
	height: 150px;
}
</style>

<cfoutput>

<div class="row-fluid" style="margin-bottom: 10px;">
	<div class="span12">
		<a id="filterLink" href="##" class="btn" onclick="toggleFilter('filter')">Show filters</a>
		<span class="pull-right"><strong>Count:</strong> #evaluationCount#</span>
	</div>
</div>

<div id="filter" class="row-fluid" style="display: none;">
	<div class="span12">
		<!--- <h4>Data Controls</h4> --->
		<div class="well well-framed">
			<cfform name="evaluationsForm" id="evaluationsForm" action="#script_name#" method="post">
				<cfinput type="hidden" name="view" value="#view#">
				<div class="row-fluid">
					<div class="span4">
						<table cellpadding="6" border="0">
							<tr valign="top">
								<td>
									<label>Program Year</label>
									<cfselect name="filterProgramYear" size="1" multiple="false" required="yes" message="Program Year filter is required">
										<cfloop index="y" from="2012" to="#ListFirst(application.currentProgramYear, '-')#">
											<cfset py = "#y#-" & y+1>
											<option value="#py#"<cfif client.howDidWeDo.programYear eq py> selected</cfif>>#py#</option>
										</cfloop>
									</cfselect>
								</td>
							</tr>
							<tr>
								<cfif IsUserInRole("Super User")>
									<td>
										<label>Region</label>
										<cfselect name="filterRegionIDs" size="1" multiple="false" required="yes" message="Region filter is required">
											<option value="All"<cfif client.howDidWeDo.regionIDs eq "All"> selected</cfif>>All</option>
											<cfloop query="regions">
												<option value="#Region_ID#"<cfif ListFind(client.howDidWeDo.regionIDs, Region_ID)> selected</cfif>>#Region_ID#</option>
											</cfloop>
										</cfselect>
									</td>
								</cfif>
							</tr>
							<tr>
								<td>
									<label>County</label>
									<cfselect name="filterCountyIDs" size="1" multiple="false" required="yes" message="County filter is required">
										<option value="All"<cfif client.howDidWeDo.countyIDs eq "All"> selected</cfif>>All</option>
										<cfloop query="counties">
											<option value="#County_ID#"<cfif ListFind(client.howDidWeDo.countyIDs, County_ID)> selected</cfif>>#County#</option>
										</cfloop>
									</cfselect>
								</td>
							</tr>
							<tr>
								<td>
									<label>School District</label>
									<cfselect name="filterDistrictIDs" size="1" multiple="false" required="yes" message="School District filter is required">
										<option value="All">All</option>
										<option>Coming soon</option>
									</cfselect>
								</td>
							</tr>
							<tr>
								<td>
									<label>School</label>
									<cfselect name="filterSchoolIDs" size="1" multiple="false" required="yes" message="School filter is required">
										<option value="All">All</option>
										<option>Coming soon</option>
									</cfselect>
								</td>
								<!--- <td>
									<label>Organizations</label>
									<cfselect name="filterOrganizationIDs" size="7" multiple="true" required="yes" message="Organization filter is required" style="width: auto;">
										<option value="All"<cfif client.howDidWeDo.organizationIDs eq "All"> selected</cfif>>All</option>
										<cfloop query="organizations">
											<option value="#Organization_ID#"<cfif ListFind(client.howDidWeDo.organizationIDs, Organization_ID)> selected</cfif>>#Organization# - #City#</option>
										</cfloop>
									</cfselect>
								</td>
								<td>
									<!--- <label>Follow Up</label>
									<cfif client.students.programYear neq "All" and client.students.programYear gte "2012-2013">
										<cfselect name="filterFollowUp" size="1" multiple="false" required="yes" message="Follow Up filter is required">
											<option value="All"<cfif client.students.followUp eq "All"> selected</cfif>>All</option>
											<option value="Yes"<cfif client.students.followUp eq "Yes"> selected</cfif>>Yes</option>
											<option value="No"<cfif client.students.followUp eq "No"> selected</cfif>>No</option>
										</cfselect>
									<cfelse>
										<span class="muted"><small>Not available as filtered</small></span>
									</cfif> --->
								</td>
								<td>
									<!--- <label>Follow Up Status</label>
									<cfif client.students.programYear neq "All" and client.students.programYear gte "2012-2013">
										<cfselect name="filterFollowUpStatus" size="1" multiple="false" required="yes" message="Follow Up Status filter is required">
											<option value="All"<cfif client.students.followUpStatus eq "All"> selected</cfif>>All</option>
											<option value="Complete"<cfif client.students.followUpStatus eq "Complete"> selected</cfif>>Complete</option>
											<option value="Not Complete"<cfif client.students.followUpStatus eq "Not Complete"> selected</cfif>>Not Complete</option>
										</cfselect>
									<cfelse>
										<span class="muted"><small>Not available as filtered</small></span>
									</cfif> --->
								</td> --->
							</tr>
						</table>
					</div>
					<div class="span8">
						<table cellpadding="6" border="0">
							<tr>
								<td colspan="2">
									<label>Dimension 1</label>
									<cfselect name="dimension1" size="1" multiple="false" required="yes" message="Dimention 1 is required" style="width: auto;">
										<option value="1">FAFSAs submitted and completed</option>
										<option value="2">E1 FAFSAs submitted and completed</option>
										<option value="3">Cal Grant GPAs submitted by March 2 deadline</option>
										<option value="4">Entitlement Cal Grant applications and awards offered</option>
										<option value="5">Entitlement E1 Cal Grant applications and awards offered</option>
										<option value="6">E1 Enrollment</option>
										<option value="7">E1 Cal Grant Champion schools</option>
										<option value="7">E1 Cal Grant Champion districts</option>
										<option value="8">Total state and federal funds...</option>
										<cfloop index="q" from="1" to="#ArrayLen(baseData)#">
											<option value="#q#"<cfif q eq 11> selected</cfif>>#baseData[q].Question#</option>
										</cfloop>
									</cfselect>
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<label>Dimension 2</label>
									<cfselect name="dimension2" size="1" multiple="false" required="yes" message="Dimention 2 is required" style="width: auto;">
										<option value="None">None</option>
										<option value="1">FAFSAs submitted and completed</option>
										<option value="2">E1 FAFSAs submitted and completed</option>
										<option value="3">Cal Grant GPAs submitted by March 2 deadline</option>
										<option value="4">Entitlement Cal Grant applications and awards offered</option>
										<option value="5">Entitlement E1 Cal Grant applications and awards offered</option>
										<option value="6">E1 Enrollment</option>
										<option value="7">E1 Cal Grant Champion schools</option>
										<option value="7">E1 Cal Grant Champion districts</option>
										<option value="8">Total state and federal funds...</option>
										<cfloop index="q" from="1" to="#ArrayLen(baseData)#">
											<option value="#q#"<cfif q eq 12> selected</cfif>>#baseData[q].Question#</option>
										</cfloop>
									</cfselect>
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<label>Dimension 3</label>
									<cfselect name="dimension3" size="1" multiple="false" required="yes" message="Dimention 2 is required" style="width: auto;">
										<option value="None">None</option>
										<option value="1">FAFSAs submitted and completed</option>
										<option value="2">E1 FAFSAs submitted and completed</option>
										<option value="3">Cal Grant GPAs submitted by March 2 deadline</option>
										<option value="4">Entitlement Cal Grant applications and awards offered</option>
										<option value="5">Entitlement E1 Cal Grant applications and awards offered</option>
										<option value="6">E1 Enrollment</option>
										<option value="7">E1 Cal Grant Champion schools</option>
										<option value="7">E1 Cal Grant Champion districts</option>
										<option value="8">Total state and federal funds...</option>
										<cfloop index="q" from="1" to="#ArrayLen(baseData)#">
											<option value="#q#">#baseData[q].Question#</option>
										</cfloop>
									</cfselect>
								</td>
							</tr>
						</table>
					</div>
				</div>
				<div class="row-fluid">
					<div class="span12">
						<button type="submit" class="btn btn-primary">Apply</button><!---  <a href="#script_name#?view=exitSurveys&resetFilters=true" class="btn">Clear</a> --->
					</div>
				</div>
			</cfform>
		</div>
	</div>
</div>
<!--- <div id="table_div" class="clearfix" style="width: 100%; height: 400px;"></div>
<div id="chart_div" class="clearfix" style="width: 100%; height: 400px;"></div> --->
<!--- <div class="accordion" id="esAccordian">
	<cfloop index="q" from="1" to="#ArrayLen(baseData)#">
		<cfset totalExitSurveys = baseData[q].Response_Count + baseData[q].No_Response_Count />
		<cfset noResponsePercent = baseData[q].No_Response_Count / totalExitSurveys * 100 />
		<cfset multiResponsePercent = baseData[q].Multi_Response_Count / totalExitSurveys * 100 />
		<div class="accordion-group">
			<div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="##esAccordian" href="##p#q#">#q#. #baseData[q].Question#</a> </div>
			<div id="p#q#" class="accordion-body collapse<cfif q eq 1> in</cfif>">
				<div class="accordion-inner">
					<cfif q eq 8>
						Data can not be charted.
					<cfelse>
						<ul class="nav nav-pills">
							<li class="active"><a href="##table#q#" data-toggle="pill">Table</a></li>
							<li><a href="##chart#q#" data-toggle="pill">Chart</a></li>
						</ul>
						<div class="tab-content">
							<div class="tab-pane active" id="table#q#">
								<table class="table table-hover table-bordered">
									<thead>
										<th>Answer</th>
										<th>Count</th>
										<th>Percent</th>
									</thead>
									<tbody>
										<cfloop index="a" from="1" to="#ArrayLen(baseData[q].Answers)#">
											<tr>
												<td>#baseData[q].Answers[a].Answer#</td>
												<td>#baseData[q].Answers[a].Response_Count#</td>
												<td>#baseData[q].Answers[a].Response_Percent#%</td>
											</tr>
										</cfloop>
										<tr>
											<td>Did not respond</td>
											<td>#baseData[q].No_Response_Count#</td>
											<td>#DecimalFormat(noResponsePercent)#%</td>
										</tr>
										<cfif baseData[q].Question_Type eq "Multiple select">
											<tr>
												<td>Multiple responses</td>
												<td>#baseData[q].Multi_Response_Count#</td>
												<td>#DecimalFormat(multiResponsePercent)#%</td>
											</tr>
										</cfif>
									</tbody>
								</table>
							</div>
							<div class="tab-pane" id="chart#q#">
								<div id="q#q#Chart"></div>
							</div>
						</div>
					</cfif>
				</div>
			</div>
		</div>
	</cfloop>
</div> --->
<div class="row-fluid">
	<div class="span6">		
		<cfset dim = 1>
		<cfloop index="q" from="11" to="12">
			<cfset totalExitSurveys = baseData[q].Response_Count + baseData[q].No_Response_Count />
			<cfset noResponsePercent = baseData[q].No_Response_Count / totalExitSurveys * 100 />
			<cfset multiResponsePercent = baseData[q].Multi_Response_Count / totalExitSurveys * 100 />
			
			<h4>Dimension #dim# - #baseData[q].Question#</h4>
			
			<div class="row-fluid">
				<div class="span8">
					<table class="table table-hover table-bordered">
						<thead>
							<th>Answer</th>
							<th>Count</th>
							<th>Percent</th>
						</thead>
						<tbody>
							<cfloop index="a" from="1" to="#ArrayLen(baseData[q].Answers)#">
								<tr>
									<td>#baseData[q].Answers[a].Answer#</td>
									<td>#baseData[q].Answers[a].Response_Count#</td>
									<td>#baseData[q].Answers[a].Response_Percent#%</td>
								</tr>
							</cfloop>
							<tr>
								<td>Did not respond</td>
								<td>#baseData[q].No_Response_Count#</td>
								<td>#DecimalFormat(noResponsePercent)#%</td>
							</tr>
							<cfif baseData[q].Question_Type eq "Multiple select">
								<tr>
									<td>Multiple responses</td>
									<td>#baseData[q].Multi_Response_Count#</td>
									<td>#DecimalFormat(multiResponsePercent)#%</td>
								</tr>
							</cfif>
						</tbody>
					</table>
				</div>
				<div class="span4">
					<div id="q#q#Chart"></div>
				</div>
			</div>
			<cfif dim eq 2>
				<h4>Dimension 1 x Dimension 2</h4>
				<div class="row-fluid">
					<div class="span8">
						<table class="table table-hover table-bordered">
						<thead>
							<th>D1 Answer</th>
							<th>D2 Answer</th>
							<th>Count</th>
							<th>Percent</th>
						</thead>
						<tbody>
							
								<tr>
									<td>Male</td>
									<td>American Indian or Alaskan Native</td>
									<td>46</td>
									<td>1.96%</td>
								</tr>
								<tr>
									<td>Female</td>
									<td>American Indian or Alaskan Native</td>
									<td>46</td>
									<td>1.96%</td>
								</tr>
								
								<tr>
									<td>Male</td>
									<td>Asian</td>
									<td>112</td>
									<td>4.77%</td>
								</tr>
								<tr>
									<td>Female</td>
									<td>Asian</td>
									<td>112</td>
									<td>4.77%</td>
								</tr>
							
								<tr>
									<td>Male</td>
									<td>Black/African American</td>
									<td>104</td>
									<td>4.43%</td>
								</tr>
								<tr>
									<td>Female</td>
									<td>Black/African American</td>
									<td>104</td>
									<td>4.43%</td>
								</tr>
							
								<tr>
									<td>Male</td>
									<td>Hispanic/Latino</td>
									<td>1779</td>
									<td>75.73%</td>
								</tr>
								<tr>
									<td>Female</td>
									<td>Hispanic/Latino</td>
									<td>1779</td>
									<td>75.73%</td>
								</tr>
							
								<tr>
									<td>Male</td>
									<td>Native Hawaiian or other Pacific Islander</td>
									<td>23</td>
									<td>0.98%</td>
								</tr>
								<tr>
									<td>Female</td>
									<td>Native Hawaiian or other Pacific Islander</td>
									<td>23</td>
									<td>0.98%</td>
								</tr>
							
								<tr>
									<td>Male</td>
									<td>White</td>
									<td>423</td>
									<td>18.01%</td>
								</tr>
								<tr>
									<td>Female</td>
									<td>White</td>
									<td>423</td>
									<td>18.01%</td>
								</tr>
							
								<tr>
									<td>Male</td>
									<td>Other</td>
									<td>37</td>
									<td>1.58%</td>
								</tr>
								<tr>
									<td>Female</td>
									<td>Other</td>
									<td>37</td>
									<td>1.58%</td>
								</tr>
							
								<tr>
									<td>Male</td>
									<td>Decline to answer</td>
									<td>29</td>
									<td>1.23%</td>
								</tr>
								<tr>
									<td>Female</td>
									<td>Decline to answer</td>
									<td>29</td>
									<td>1.23%</td>
								</tr>
							
							<tr>
								<td>Male</td>
								<td>Did not respond</td>
								<td>27</td>
								<td>1.14%</td>
							</tr>
							<tr>
								<td>Female</td>
								<td>Did not respond</td>
								<td>27</td>
								<td>1.14%</td>
							</tr>
							
								<tr>
									<td>Male</td>
									<td>Multiple responses</td>
									<td>177</td>
									<td>7.45%</td>
								</tr>
								<tr>
									<td>Female</td>
									<td>Multiple responses</td>
									<td>177</td>
									<td>7.45%</td>
								</tr>
							
						</tbody>
					</table>

					</div>
					<div class="span4">
						<div class="well well-framed">
							Chart
						</div>
					</div>
				</div>
			</cfif>
			<cfset dim++ />
		</cfloop>
		
	</div>
	<div class="span6">
	
		<ul class="nav nav-tabs">
			<li class="active"><a href="##districtMap" data-toggle="tab">Districts</a></li>
			<li><a href="##schoolMap" data-toggle="tab">Schools</a></li>
			<!--- <li><a href="##countyMap">Counties</a></li> --->
		</ul>
		<div class="tab-content">
			<div class="tab-pane active" id="districtMap">
				<iframe 	width="100%" 
							height="800" 
							frameborder="0" 
							scrolling="no" 
							marginheight="0" 
							marginwidth="0" 
							src="https://www.google.com/fusiontables/embedviz?q=select+col2+from+1duB6hyn5n1ukEWBrhbyCK0U1T_ufWC0m26E0QKA&amp;viz=MAP&amp;h=false&amp;lat=37.41896824258246&amp;lng=-119.30660499999999&amp;t=1&amp;z=6&amp;l=col2"></iframe>
						
			</div>		
			<div class="tab-pane" id="schoolMap">		
				<iframe 	width="100%" 
							height="800" 
							frameborder="0" 
							scrolling="no" 
							marginheight="0" 
							marginwidth="0" 
							src="https://www.google.com/fusiontables/embedviz?q=select+col2+from+1z9zka5upPaG2QDp53pUZPLvxdsrMbxVTMaxEn34&amp;viz=MAP&amp;h=false&amp;lat=37.41896824258246&amp;lng=-119.30660499999999&amp;t=1&amp;z=6&amp;l=col2"></iframe>
			</div>			
			<!--- <div id="map_div" style="width: 100%; height: 100%;"></div> --->
		</div>
	</div>
</div>

</cfoutput>
<!---<iframe width="500" height="300" scrolling="no" frameborder="no" src="https://www.google.com/fusiontables/embedviz?q=select+col2+from+1z9zka5upPaG2QDp53pUZPLvxdsrMbxVTMaxEn34&amp;viz=MAP&amp;h=false&amp;lat=37.660996516345364&amp;lng=-117.67721371049997&amp;t=1&amp;z=6&amp;l=col2"></iframe> <iframe width="500" height="300" scrolling="no" frameborder="no" src="https://www.google.com/fusiontables/embedviz?q=select+col2+from+1duB6hyn5n1ukEWBrhbyCK0U1T_ufWC0m26E0QKA&amp;viz=MAP&amp;h=false&amp;lat=37.41896824258246&amp;lng=-119.30660499999999&amp;t=1&amp;z=6&amp;l=col2"></iframe>
// School Districts
https://www.google.com/fusiontables/DataSource?snapid=S107070198FJ
// Public schools
https://www.google.com/fusiontables/DataSource?snapid=S1070801g4Pc --->
<cfelse>

<p class="noRecords">No data</p>

<script type="text/javascript" language="javascript">
<!--
$(function() {
	$("#filter").show();
});
// -->
</script>

</cfif> --->